activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: Load balancing message groups
Date Thu, 09 Nov 2006 08:43:21 GMT
I suspect its because you are using such a small number of messages.

http://incubator.apache.org/activemq/i-do-not-receive-messages-in-my-second-consumer.html

try setting the prefetch to 10 or something - or sending way more messages

On 11/9/06, Pavan Sheel <pavansheel@yahoo.com> wrote:
>
> 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.
>
>


-- 

James
-------
http://radio.weblogs.com/0112098/

Mime
View raw message