activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hiram Chirino" <hi...@hiramchirino.com>
Subject Re: detaching message group affinity
Date Mon, 19 Jun 2006 15:22:34 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.

BTW: this would only be an issue when producers on different brokers
are sending to the same message group which might not be a common use
case.

>
> 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?
>
> >
> > > 2. Is there a way to detach a message group affinity to a particular broker.
> >
> > Just set JMSXGroupSeq to zero on the last message which 'closes' the
> > message group so if another message is sent in the future with the
> > same group ID it will be reassigned to a new consumer.
> >
> > message.setIntProperty("JMSXGroupSeq", 0);
> >
> > --
> >
> > James
> > -------
> > http://radio.weblogs.com/0112098/
> >
>
>
> --
> Regards,
> Hiram
>
> Blog: http://hiramchirino.com
>


-- 
Regards,
Hiram

Blog: http://hiramchirino.com

Mime
View raw message