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:
http://www.nabble.com/Horizontally-scaling-JMS-listener-consumer-application.....in-Active-MQ-environment-tp25530088p25622225.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
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 ;)
cheers,
Rob
Rob Davies
http://twitter.com/rajdavies
I work here: http://fusesource.com
My Blog: http://rajdavies.blogspot.com/
I'm writing this: http://www.manning.com/snyder/