activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Holger Bruch (JIRA)" <>
Subject [jira] Created: (AMQ-1006) RoundRobinDispatchPolicy divides uneven
Date Thu, 26 Oct 2006 13:15:02 GMT
RoundRobinDispatchPolicy divides uneven

                 Key: AMQ-1006
             Project: ActiveMQ
          Issue Type: Bug
          Components: Broker
    Affects Versions: 4.0.2
            Reporter: Holger Bruch
            Priority: Minor
         Attachments: RoundRobinDispatchPolicyDivide.patch

In case that multiple consumers with different message selectors are registered for the same
destination, messages are not evenly divided.

To reproduce, register 2 consumers for prio 9, one for prio 4. Of 1000 messages with prio
9 both prio 9 consumers should receive 500. Actually, the first consumer gets 667 messages,
the second 333.

This is caused by the consumer shifting strategy in the RoundRobinDispatchPolicy which rotates
consumers, even if they did not match.

The attached file contains a testcase illustrating the behavior and a patch for RoundRobinDispatchPolicy,
that shifts the first matching consumer instead of the first.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message