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 JMS Connector, when configured with a JMS 2.0 connection, allows you to declare any 'topic-consumer' as part of a shared subscription:
<jms:listener config-ref="config" destination="InvoiceEventsTopic">
<jms:consumer-type>
<jms:topic-consumer shared="true" subscriptionName="ClusterSubscription"/>
</jms:consumer-type>
</jms: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.