3 Replies Latest reply on May 28, 2014 3:57 PM by Clebert Suconic

    Message groups are not evenly distributed among consumers

    Asim Mahmood Newbie

      When using message groups it appears as if the groups are not being evenly distributed among the consumers. The problem is most apparent when you tend to process a number of messages for the same group together. I have attached one of the current unit tests which I modified to demonstrate the issue. The test I added was testManyGroups2. The test creates 3 consumers which consume 30 messages split across 10 groups. All 30 messages will  only get picked up by the first consumer.


      Is this a bug or a configuration error? I believe this could be a bug as it looks like QueueImpl continues to round robin the consumers even when a message is going to a consumer that is pinned to a group. This means consumers can be rotated when no message is sent to them. As a simple test I ran the test on hornetQ 2.4.1 which failed. I then made a simple change to QueueImpl to only rotate the consumers if they are actually used.  When this was done the test passed. I have also attached the patch with the change I made.