You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by TiredAndEmotional <st...@yahoo.co.uk> on 2006/04/19 19:43:54 UTC

Message Groups and load balancing

Hi,

I'm in the process of replacing our current JMS implementation with ActiveMQ
and noticed the Message Groups feature in version 4.0. This feature may be
very useful to my current refactoring of our software, but that is dependent
upon how load balancing works in Message groups. 

I don't suppose anyone on the list can give me some insite into how the
loads are balanced? 

Is it simply that the first consumer to grab hold of a message from a group
then gets all messages assigned to that group (thus leading to a stochastic
load balancing under the assumption of many concurrent message groups not of
disimilar size as a loaded consumer is less likey to be the next free
consumer) or is some other logic used?

Many thanks for your time and consideration.

Steve Siller
--
View this message in context: http://www.nabble.com/Message-Groups-and-load-balancing-t1475847.html#a3992673
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Message Groups and load balancing

Posted by James Strachan <ja...@gmail.com>.
On 4/19/06, TiredAndEmotional <st...@yahoo.co.uk> wrote:
>
> Hi,
>
> I'm in the process of replacing our current JMS implementation with ActiveMQ
> and noticed the Message Groups feature in version 4.0. This feature may be
> very useful to my current refactoring of our software, but that is dependent
> upon how load balancing works in Message groups.
>
> I don't suppose anyone on the list can give me some insite into how the
> loads are balanced?
>
> Is it simply that the first consumer to grab hold of a message from a group
> then gets all messages assigned to that group (thus leading to a stochastic
> load balancing under the assumption of many concurrent message groups not of
> disimilar size as a loaded consumer is less likey to be the next free
> consumer) or is some other logic used?

Yeah - we basically try to see which consumer should get a message
using the dispatch policy, then if the message matches whatever
filters/selectors, we check if the message is part of a group and if
so, dispatch it to the consumer who owns that group or assign it to
the current consumer.

So the load balancing algorithm is kinda random right now :).
Hopefully for a reasonably large number of message groups, things
should get fairly evenly distributed. We could get clever in the
future by monitoring how many groups a consumer has and explicitly
moving some to other consumers etc

--

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