activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Davies <>
Subject Re: Horizontally scaling JMS listener/consumer Active MQ environment
Date Sat, 26 Sep 2009 05:58:05 GMT

On 26 Sep 2009, at 05:28, G1 wrote:

> if I can have 2 consumer's on a queue (say A and B) and the message is
> gauranteed to be delivered to only one of
> ..... does the AMQ broker decide which one
> ..... can I as the AMQ user (publisher) control which consumer shud  
> receive
> (in effect achieve a load balance)
> ~g1
> Gabe Westmaas-2 wrote:
>> Both queues and topics can have multiple consumers, ....while the  
>> purpose
>> of a queue is that each message is only delivered to one consumer.
>> Gabe
> -- 
> View this message in context:
> Sent from the ActiveMQ - Dev mailing list archive at

The broker controls which Consumer gets the message because it knows  
which of the consumers is the least loaded (messages are delivered  
round-robin - but if  Consumer A is at its prefetch limit when a  
message is due to be dispatched - it will be skipped if Consumer B  
isn't at its prefetch limit etc).

Usual practice is to use selectors to have some sort of control of  
message delivery, or temporary queues, or unique  named queues (e.g.  
Foo.ConsumerA) - there's a lot of different ways of achieving the same  
thing actually ;)



Rob Davies
I work here:
My Blog:
I'm writing this:

View raw message