NonStop JMS User's Manual (H06.03+, J06.03+, NonStop JMS 3.0+)
NSJMS and JMS Client Applications
NonStop Server for Java Message Service User’s Manual—522356-006
4-11
Receiving Messages
This method is similar to creating a non-durable subscriber, except that you must pass
a subscription name to identify the unique subscriber. For example:
TopicSubscriber subscriber=
session.createDurableSubscriber(topic,MY_SUB_01);
The subscriber becomes active after you start the TopicConnection. Later on, the
TopicSubscriber can be closed by calling the close() method of
TopicSubscriber object. For example, subscriber.close();
If the program or another application calls createDurableSubscriber method with
the same client ID, topic, and subscription name, then the subscription is reactivated.
Subsequently, the NSJMS delivers the messages that were published while the
subscriber was inactive.
To terminate a durable subscriber, use the unsubscribe() method and submit the
unique name that created the subscriber. For example:
session.unsubscribe(MY_SUB_01);