Viktor R
Viktor R

Reputation: 21

ActiveMQ duplicate session IDs for different consumers

I'm administering an ActiveMQ broker where the queue size is constantly increasing. I was told the problem is likely with the broker as opposed to the consumers (7 of them).

Most of the queues show duplicate, triplicate etc., SessionId column entries for different consumers (each a separate server).

I'd have thought that each consumer would have its own thread (per queue?) and this state seems wrong - thus my suspicion that this is causing the slow processing which is backing queues up.

Can someone shed some light on the relationship between consumer and SessionId on the 'Browse Active Consumers' page?

Thanks!

Upvotes: 2

Views: 1489

Answers (1)

Erik Williams
Erik Williams

Reputation: 933

For every consumer (concurrent or otherwise) thread, you will see a sessionid listed in the "Browse Active Consumers" page. What you are seeing is correct.

The performance issue can come from any number of things, but I highly doubt it is due to the number of consumers. The most common cause of queue back up (on any provider) is a poorly performing consumer that is not able to keep up with the production of messages. Why it is performing poorly can anything from network to time it takes to do whatever the application needs to do with the message and commit (if using transactions or other non-auto-ack mode).

Look at your dispatch queue column. If using defaults on your consumer, you should have up to 1000 messages pending for each consumer. When you refresh if you see the dequeue count slowly increase, this normally means the consumers are slow to acknowledge.

Upvotes: 1

Related Questions