activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject activemq git commit: https://issues.apache.org/jira/browse/AMQ-5379 - use zero prefetch if consumer credit is unknown when connecting
Date Thu, 04 Dec 2014 11:41:16 GMT
Repository: activemq
Updated Branches:
  refs/heads/trunk 7bafa7da5 -> 5d77b395f


https://issues.apache.org/jira/browse/AMQ-5379 - use zero prefetch if consumer credit is unknown
when connecting


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/5d77b395
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/5d77b395
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/5d77b395

Branch: refs/heads/trunk
Commit: 5d77b395f60252644574aef2088e170e19f01c41
Parents: 7bafa7d
Author: Dejan Bosanac <dejan@nighttale.net>
Authored: Thu Dec 4 12:32:50 2014 +0100
Committer: Dejan Bosanac <dejan@nighttale.net>
Committed: Thu Dec 4 12:32:59 2014 +0100

----------------------------------------------------------------------
 .../apache/activemq/transport/amqp/AmqpProtocolConverter.java  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/5d77b395/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java
----------------------------------------------------------------------
diff --git a/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java
b/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java
index 9a252f2..da43c51 100644
--- a/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java
+++ b/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java
@@ -321,7 +321,7 @@ class AmqpProtocolConverter implements IAmqpProtocolConverter {
 
     protected void processLinkFlow(Link link) throws Exception {
         Object context = link.getContext();
-        int credit = link.getRemoteCredit();
+        int credit = link.getCredit();
         if (context instanceof ConsumerContext) {
             ConsumerContext consumerContext = (ConsumerContext)context;
             // change consumer prefetch if it's not been already set using
@@ -1349,9 +1349,9 @@ class AmqpProtocolConverter implements IAmqpProtocolConverter {
                     consumerInfo.setPrefetchSize(senderCredit);
                     consumerContext.consumerPrefetch = senderCredit;
                 } else {
-                    // set default value for now and change to the consumer's preference
+                    // set zero value for now and change to the consumer's preference
                     // on the first flow packet
-                    consumerInfo.setPrefetchSize(AMQPProtocolDiscriminator.DEFAULT_PREFETCH);
+                    consumerInfo.setPrefetchSize(0);
                 }
             }
             consumerContext.credit = senderCredit;


Mime
View raw message