In JMS 1.1, a subscription on a topic was not permitted to have more than one
consumer at a time, meaning that the work of processing messages on a topic
subscription could not be shared, thereby limiting the scalability of the application.
This restriction has been removed in JMS 2.0 by the introduction of shared subscriptions.
The IBM MQ Connector, when configured with a JMS 2.0 connection, allows you to
declare any topic-consumer as part of a shared subscription:
<ibm-mq:listener config-ref="config" destination="InvoiceEventsTopic">
<ibm-mq:consumer-type>
<ibm-mq:topic-consumer shared="true" subscriptionName="ClusterSubscription"/>
</ibm-mq:consumer-type>
</ibm-mq:listener>
With this configuration on two different listener instances, when a Message
is published to the invoices destination, it will be delivered only to one of the
listeners and not the other.