only rotate consumers if there are consumers to rotate!

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@476093 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Davies 2006-11-17 09:48:27 +00:00
parent c1d82a43c6
commit e582e2fd40
1 changed files with 2 additions and 1 deletions

View File

@ -66,6 +66,7 @@ public class RoundRobinDispatchPolicy implements DispatchPolicy {
// Rotate the consumer list.
try {
if (consumers.size() > 1)
consumers.add(consumers.remove(0));
} catch (Throwable bestEffort) {
log.error("Caught error rotating consumers",bestEffort);