When trying to setup a failover safe master/slave setup for Search using JMS, it is important that index updates for a given index are only processed by a single consumer (message driven bean). In case there are multiple beans listening to the same JMS queue as part of the failover strategy, without so called message grouping, index updates could be applied out of order, since the queue consumer work independently. Message grouping ensures that all messages for the same group get consumed by the same consumer (while it is alive).
JmsBackendQueueTask actually already sets the index name as a custom string property. At the moment Environment.INDEX_NAME_JMS_PROPERTY is used which is set to HSearchIndexName. The easiest approach seems to be to just change HSearchIndexName to the standard header JMSXGroupID.