activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r476093 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/RoundRobinDispatchPolicy.java
Date Fri, 17 Nov 2006 09:48:28 GMT
Author: rajdavies
Date: Fri Nov 17 01:48:27 2006
New Revision: 476093

URL: http://svn.apache.org/viewvc?view=rev&rev=476093
Log:
only rotate consumers if there are consumers to rotate!

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/RoundRobinDispatchPolicy.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/RoundRobinDispatchPolicy.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/RoundRobinDispatchPolicy.java?view=diff&rev=476093&r1=476092&r2=476093
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/RoundRobinDispatchPolicy.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/RoundRobinDispatchPolicy.java
Fri Nov 17 01:48:27 2006
@@ -66,7 +66,8 @@
             
             // Rotate the consumer list.
             try {
-                consumers.add(consumers.remove(0));
+                if (consumers.size() > 1)
+                    consumers.add(consumers.remove(0));
             } catch (Throwable bestEffort) {
                 log.error("Caught error rotating consumers",bestEffort);
             }



Mime
View raw message