This topic has not yet been written. The content below is from the topic description.
Chapter 28. Message Grouping Message groups are sets of messages that have the following characteristics: Messages in a message group share the same group id, i.e. they have same group identifier property (JMSXGroupID for JMS, _HQ_GROUP_ID for HornetQ Core API). Messages in a message group are always consumed by the same consumer, even if there are many consumers on a queue. They pin all messages with the same group id to the same consumer. If that consumer closes another consumer is chosen and will receive all messages with the same group id. Message groups are useful when you want all messages for a certain value of the property to be processed serially by the same consumer. An example might be orders for a certain stock. You may want orders for any particular stock to be processed serially by the same consumer. To do this you can create a pool of consumers (perhaps one for each stock, but less will work too), then set the stock name as the value of the _HQ_GROUP_ID property. This will ensure that all messages for a particular stock will always be processed by the same consumer.