activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r640626 - in /activemq/branches/activemq-4.1: activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQEndpointWorker.java
Date Mon, 24 Mar 2008 22:42:27 GMT
Author: djencks
Date: Mon Mar 24 15:42:25 2008
New Revision: 640626

URL: http://svn.apache.org/viewvc?rev=640626&view=rev
Log:
AMQ-1632.  Correct prefetch size instead of trying to push messages more often

Modified:
    activemq/branches/activemq-4.1/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java
    activemq/branches/activemq-4.1/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQEndpointWorker.java

Modified: activemq/branches/activemq-4.1/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-4.1/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java?rev=640626&r1=640625&r2=640626&view=diff
==============================================================================
--- activemq/branches/activemq-4.1/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java
(original)
+++ activemq/branches/activemq-4.1/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java
Mon Mar 24 15:42:25 2008
@@ -181,7 +181,6 @@
                                     dispatched.remove(node);
                                     node.getRegionDestination().getDestinationStatistics().getDequeues().increment();
                                     prefetchExtension=Math.max(0,prefetchExtension-1);
-                                    dispatchMatched();
                                 }
                             }
 

Modified: activemq/branches/activemq-4.1/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQEndpointWorker.java
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-4.1/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQEndpointWorker.java?rev=640626&r1=640625&r2=640626&view=diff
==============================================================================
--- activemq/branches/activemq-4.1/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQEndpointWorker.java
(original)
+++ activemq/branches/activemq-4.1/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQEndpointWorker.java
Mon Mar 24 15:42:25 2008
@@ -153,20 +153,21 @@
                         }
                     });
 
+                    int prefetchSize = activationSpec.getMaxMessagesPerSessionsIntValue()
* activationSpec.getMaxSessionsIntValue();
                     if (activationSpec.isDurableSubscription()) {
                         consumer = connection.createDurableConnectionConsumer(
                                 (Topic) dest,
                                 activationSpec.getSubscriptionName(), 
                                 emptyToNull(activationSpec.getMessageSelector()),
                                 serverSessionPool, 
-                                activationSpec.getMaxMessagesPerSessionsIntValue(),
+                                prefetchSize,
                                 activationSpec.getNoLocalBooleanValue());
                     } else {
                         consumer = connection.createConnectionConsumer(
                                 dest, 
                                 emptyToNull(activationSpec.getMessageSelector()), 
                                 serverSessionPool, 
-                                activationSpec.getMaxMessagesPerSessionsIntValue(),
+                                prefetchSize,
                                 activationSpec.getNoLocalBooleanValue());
                     }
 



Mime
View raw message