gtully commented on a change in pull request #3918:
URL: https://github.com/apache/activemq-artemis/pull/3918#discussion_r787577622



##########
File path: 
artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQConsumer.java
##########
@@ -232,11 +232,24 @@ public ConsumerId getId() {
       return info.getConsumerId();
    }
 
-   public void acquireCredit(int n) {
+   public void acquireCredit(int n, boolean delivered) {
       if (messagePullHandler.get() != null) {
          //don't acquire any credits when the pull handler controls it!!
          return;
       }
+
+      if (delivered) {
+         deliveredAcksCreditExtension += n;
+      } else if (deliveredAcksCreditExtension > 0) {

Review comment:
       that is better, now the normal deliveredAcksCreditExtension == 0 branch 
is clear




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to