summaryrefslogtreecommitdiff
path: root/qpid
diff options
context:
space:
mode:
Diffstat (limited to 'qpid')
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer_0_10.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer_0_10.java b/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer_0_10.java
index bfdaa66618..549acef389 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer_0_10.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer_0_10.java
@@ -267,7 +267,6 @@ public class BasicMessageConsumer_0_10 extends BasicMessageConsumer<Struct[], By
_logger.debug("filterMessage - trying to ack message");
}
acknowledgeMessage(message);
- requestCreditIfCreditMode();
}
else if (!messageOk)
{
@@ -276,7 +275,6 @@ public class BasicMessageConsumer_0_10 extends BasicMessageConsumer<Struct[], By
_logger.debug("Message not OK, releasing");
}
releaseMessage(message);
- requestCreditIfCreditMode();
}
// now we need to acquire this message if needed
// this is the case of queue with a message selector set
@@ -288,6 +286,10 @@ public class BasicMessageConsumer_0_10 extends BasicMessageConsumer<Struct[], By
}
messageOk = acquireMessage(message);
}
+ if( ! messageOk )
+ {
+ requestCreditIfCreditMode();
+ }
return messageOk;
}