I am setting up an application which needs to be scaled. I post messages to Active MQ and read messages from there.
Till now , I have used maximum upto 3 concurrent consumers pointing to a queue( Each consumer operating from a different physical machine ).
I need to know maximum how many consumers I can point to a Queue in Active MQ.
Is there a maximum limit to it ?
I found this link:
http://activemq.apache.org/multiple-consumers-on-a-queue.html
But it does not state anything about Maximum connections / Sessions / consumers. It only says One session per connection.
The JMS specification does not state any limit on the number of consumers. You can add as many consumers as you want for a given Queue or Topic.
The question is how many consumers you really need. Increasing the number of consumers will allow you to do more parallel processing but you will face memory issues. For e.g. If you start thousands of consumers on a single machine it is simply going to start thousands of threads which will consume memory.
Also if you are having multiple consumers for a single Queue it is a good idea to have selectors to filter out messages from the queue so that you can have some control on messages and which listeners should consume them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With