-
1. Guaranteeing message order consumption
257980 Mar 20, 2011 2:58 AM (in response to anonimo)Hi Anonimo,
Can i put your question in this way, how to acheive strict message ordering out of the box, no matter how many consumers are there on the destination is this correct?
I guess there is no JMS provider (either open source or proprietary) that had an out of the box feature to address this.
I feel in order to maintain strict ordering there should be always only one consumer on the destination listening for messages. If you think that having a signgle consumer reduces the throughput of your application then take a look at Message Grouping feature implemented in HornetQ (note:This feature is not part of JMS Specification).
But this requires some code change on your producer, producer has to set a JMS Message Header on all the message it is sending to the destination. That messae header is JMSXGroupID (this should be unique group id).
Please have a look at http://hornetq.sourceforge.net/docs/hornetq-2.0.0.GA/user-manual/en/html/message-grouping.html
Note: I implemented this feature using Queues succesfully not sure will this work for "Topics".
Thanks,
Ravisankar C