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: detaching message group affinity
Date Mon, 19 Jun 2006 15:21:19 GMT
On 6/19/06, Hiram Chirino <hiram@hiramchirino.com> wrote:
> On 6/19/06, James Strachan <james.strachan@gmail.com> wrote:
> > On 6/17/06, Sanjiv Jivan <sanjiv.jivan@gmail.com> wrote:
> > > The Message Group functionality of Active MQ 4.0 is really neat. I have a
> > > couple of questions regarding this
> > >
> > > 1. Is this feature fully supported/tested with the P2P discovery style
> > > broker topology? Are they any test cases or samples I can try. I looked for
> > > them in the source but wasn't able to locate them. And when I tried running
> > > such a scenario, I did not see a proper load balancing (even round robin
> > > style) of message groups across available brokers. When messages belonging
> > > to different message groups are sent, oftentimes only one or a small
> > > percentage of running brokers are chosen as recipients. As a result I end up
> > > with some brokers that are overloaded while others are sitting idle.
> >
> > Generally Message Groups only apply to the broker which you are using;
> > there is no global cross-broker load balancing. So its intended when
> > using a traditional client-broker topology rather than a peer based
> > network.
> >
> > Though I'm surprised that you are finding on a single broker it is not
> > load balancing requests across multiple brokers. Are you sure there
> > are suitable consumers on those brokers?
> >
>
> I don't think our brokers differentiate between a local consumer and a
> remote consumer accessed via a network.  The broker could pick a
> remote consumer as the 'owner' of a group and all subsequent messages
> with that group id go to that remote broker.  And then the remote
> broker gets the message and would actually pick a different local
> 'owner'
>
> So, yeah I could see how load balancing might not work correctly.
> This coupled with the fact that if there are multiple producers
> attached to different brokers, then each producers broker may elect a
> different 'owner' for the group which does not help matters at all.
>
> It would have been idea if either 1) a single consumer is picked to be
> the 'owner' across the whole broker network or 2) there is a consumer
> owner per broker and messages are balanced across all the brokers.  I
> think #1 is the better option since it would allow for sequential
> processing of messages on a single node.
>
> Any ideas on how to fix this? Perhaps by employing some kind of broker advisory?

Another option is to have destinations owned by a specific broker so
that if a message is sent to a queue on a broker which is not the
owner, it sends the message to the 'owner broker' and it then does the
message-group processing..

Its a little like the Message Group concept but at the broker level
rather than the consumer level; let 1 broker be the 'controller' of a
given destination and let it choose the message group processing. This
can be useful for ensuring total ordering of messages on topics across
networks too (which is handy for distributed caching with optimistic
transactions).
-- 

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

Mime
View raw message