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: Message Groups and load balancing
Date Wed, 19 Apr 2006 18:41:43 GMT
On 4/19/06, TiredAndEmotional <stevesiller@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/

Mime
View raw message