A quote from Creating Robust JMS Applications
5.2.1 Creating Durable Subscriptions
To make sure that a pub/sub application receives all published messages, use PERSISTENT delivery mode for the publishers. In addition, use durable subscriptions for the subscribers.
The TopicSession.createSubscriber method creates a nondurable subscriber. A nondurable subscriber can receive only messages that are published while it is active.
At the cost of higher overhead, you can use the TopicSession.createDurableSubscriber method to create a durable subscriber. A durable subscription can have only one active subscriber at a time.
[...]
You establish the unique identity of a durable subscriber by setting the following:
- A client ID for the connection
- A topic and a subscription name for the subscriber
I have run some tests using JBoss 7
- I have set a client ID on the connection factory level
- Using a different subscription name for each of the three subscribers:
topicSession.createDurableSubscriber(topic, subscriptionName);
and the JMS server buffers the messages for each disconnected subscriber properly.