activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pavan Sheel <pavansh...@yahoo.com>
Subject Load balancing message groups
Date Thu, 09 Nov 2006 01:42:23 GMT

I'm having a problem getting the message groups feature to work.
Essentially , I am unable to get ActiveMQ to load-balance message groups
across multiple queue consumers.

I ran a set of tests...below is the observed behaviour.

Two consumers on separate VMs , connected to a single AMQ broker via tcp
transport.
Consumers pull messages (not JCA consumers).
200 messages pushed onto queue.
JMSXGroupID  increases from 0 - 19 , in groupsize of 10 (therefore there are
20 groups)


I expected delivery of these 20 groups to be load-balanced between the two
consumers.
However , this is what I see :

·       All messages are delivered to one consumer.
.       Explicitly setting consumer.exclusive=false does not cause group
balancing (to ensure that the previous result was not because of a default
true value).
·	Slowing down consumers does not cause group balancing.
·	Differentiating groupID values substantially (to ensure different
hashcodes) does not cause group balancing.
·	Stopping active consumer midway does make broker switch to the other
consumer.
·	Eliminating JMSXGroupID header causes message balancing (ie messages are
evenly delivered to one or the other consumer).
·	Eliminating JMSXGroupID header & setting consumer.exclusive=true does
cause broker to choose one or the other consumer for delivery of all
messages.
·	Setting mutually exclusive selectors on each consumer does force delivery
of some groups to one consumer and some to the other,  according to the
selectors (to ensure that the broker is not 'pinning' all groups to one
consumer)

SUMMARY :
When JMSXGroupID is not set , broker does message-level load balancing  (as
expected).
However - when JMSXGroupID is set , broker seems to choose one consumer
(constrained by selector , if any) , and delivers all messages to it (as if
consumer.exclusive=true).
While this delivery behaviour is semantically safe , it is preventing me
from getting groups to load-balance across consumers.

How can I get message group delivery to load-balance across multiple
consumers ?
What am I doing wrong ?

All suggestions much appreciated -
Pavan Bhatnagar


-- 
View this message in context: http://www.nabble.com/Load-balancing-message-groups-tf2599197.html#a7251011
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message