Hi, currently there is no way to restrict the consumer to consume only messages from one group. I think you can use selectors to achieve this functionality,
Cheers -- Dejan Bosanac - http://twitter.com/dejanb Open Source Integration - http://fusesource.com/ ActiveMQ in Action - http://www.manning.com/snyder/ Blog - http://www.nighttale.net On Tue, Dec 8, 2009 at 11:57 PM, MR2009 <rangwalamust...@hotmail.com> wrote: > > My environment: > a) ActiveMQ 5.3 > b) Centos 5.4 > c) JDK 1.6 Producer > d) C++ Consumer > > I am considering using ActiveMQ to solve my enterprise message routing > problem. In my setup there are say X producers and Y consumers ( X < Y ). > Each consumer start out stateless, in that it can consume any message. Once > it consumes a first message, it acquires a state, and henceforth can only > consume messages that are consistent with that state. When the consumer > ends or the producer 'signals' a end of all messages for the 'state' the > consumer again becomes stateless. > > MessageGroups seems like the obvious initial choice for this problem. The > concern I have is that using message groups, a Consumer can potentially be > sent messages for multiple states ( based on hash of the JMSXGroupId value > ). So essentially, a consumer could be handling messages for multiple > JMSXGroupIds at the same time. In my architecture this is not possible to > implement in the consumer (ie. dynamically support multiple states). > > Therefore what I am looking for is a way to define a consumer that is > ensured that it will only process messages for ONE JMSXGroupId at a time. > Perhaps other approaches are better than MessageGroups. Your help and > suggestions are much appreciated. > > Regards, > > -MR > > -- > View this message in context: > http://old.nabble.com/MessageGroups-and-Single-GroupId-Consumer-tp26702337p26702337.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > >