You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by odysseyfx <in...@bradwillard.com> on 2010/04/07 20:48:58 UTC

How does a consumer connect to a specific message group?

I was reading the Message Group documentation, and it's very clear how you
can post messages to a queue for a message group.  However, it's not clear
how a Consumer reads from a specific message group.  

Should I just use a message selector for the JMSXGroupID?

If that is true, then how is this different than just using a CorrelationID?

My real problem is that when I try to send messages to different groups of
consumers using correlation, but the messages were being received out of
order, I was hoping using message groups would fix this, but I'm not clear
how to use them properly.

Thanks,
Brad
-- 
View this message in context: http://old.nabble.com/How-does-a-consumer-connect-to-a-specific-message-group--tp28169358p28169358.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: How does a consumer connect to a specific message group?

Posted by Bruce Snyder <br...@gmail.com>.
On Wed, Apr 7, 2010 at 12:48 PM, odysseyfx <in...@bradwillard.com> wrote:
>
> I was reading the Message Group documentation, and it's very clear how you
> can post messages to a queue for a message group.  However, it's not clear
> how a Consumer reads from a specific message group.
>
> Should I just use a message selector for the JMSXGroupID?
>
> If that is true, then how is this different than just using a CorrelationID?
>
> My real problem is that when I try to send messages to different groups of
> consumers using correlation, but the messages were being received out of
> order, I was hoping using message groups would fix this, but I'm not clear
> how to use them properly.

The first consumer to receive a message with the JMSXGroupID property
will consume all messages for that specific message group until it
dies or until the message group sequence is reset. Consumers don't
choose the message group.

See the FAQ entry titled How do Message Groups compare to Selectors:

http://activemq.apache.org/how-do-message-groups-compare-to-selectors.html

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

ActiveMQ in Action: http://bit.ly/2je6cQ
Blog: http://bruceblog.org/
Twitter: http://twitter.com/brucesnyder

Re: How does a consumer connect to a specific message group?

Posted by odysseyfx <in...@bradwillard.com>.
Thanks!



odysseyfx wrote:
> 
> I was reading the Message Group documentation, and it's very clear how you
> can post messages to a queue for a message group.  However, it's not clear
> how a Consumer reads from a specific message group.  
> 
> Should I just use a message selector for the JMSXGroupID?
> 
> If that is true, then how is this different than just using a
> CorrelationID?
> 
> My real problem is that when I try to send messages to different groups of
> consumers using correlation, but the messages were being received out of
> order, I was hoping using message groups would fix this, but I'm not clear
> how to use them properly.
> 
> Thanks,
> Brad
> 

-- 
View this message in context: http://old.nabble.com/How-does-a-consumer-connect-to-a-specific-message-group--tp28169358p28171404.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.