If I use durable subscription, can I restart my client and resubscribe without loosing any messages? (Assuming, my client does not unsubscribe in any way. Lets say it just crashes).
Let me clarify. JMS 1.1 Spec says the following:
9.3.3.2 Reconnecting to a Topic using a Durable Subscription
/* Reconnect to a durable subscription */
session.createDurableSubscriber(newsFeedTopic, "mySubscription");
However, there are some important restrictions to be aware of:
- The client must be attached to the same Connection.
- The Destination and subscription name must be the same.
- If a message selector was specified, it must also be the same.
That "same Connection" part interests me. It is not clear what "same" means in this context.