Reputation: 1136
If there are multiple listeners on a queue with each java process containing a single listener, then what is the pattern of reception when messages arrive on the queue. Will :
1) each listener take turn in receiving messages. ie Message1 goes to Listener1, message 2 goes to listener2 and so on
or
2) it be a random reception
or
3) it be JMS implementation dependent.
I am using Spring DMLC for receiving the messages.
Upvotes: 1
Views: 1726
Reputation: 174749
It's completely indeterminate - it depends on many things...
It might start off round-robin but will quickly become random (not really random - predictable - the broker will generally send the next message to the first consumer that completes the processing of the previous message).
Upvotes: 3