Details
-
Bug
-
Resolution: Done
-
Critical
-
JBoss A-MQ 6.1
-
None
-
None
Description
Multiple consumers are attached to particular JMS queue. Each consumer runs on a thread and holds its own JMS session; each session is derived from the same JMS connection. Each consumer thread reads a randomized number of messages and then shuts down its consumer and starts a new one, such that each thread creates mutliple, sequential consumers from the same session.
Producers post messages to the queue, and each message is assigned a particular value of the JMSXGroupID header – the intention is that all messages with the same group ID are read by the same consumer. In my tests, each group consists of ten messages.
Message delivery to consumers is very unequal. Because each group ID has a relatively small number of messages compared to the total message volume, we expect each consumer thread to see roughly the same number of messages.
In practice, however, it's common for one or two consumers to dominate message consumption, leading to a catastrophic loss of throughput. It's common to see a consumer sitting completely idle, while another thread reads thousands of messages.