53.3. Methods

The TopicSession interface inherits the fields and the methods of the interface javax.jms.Session. The following methods are defined in the interface javax.jms.TopicSession.

createDurableSubscriber(Topic, String)

public TopicSubscriber createDurableSubscriber(Topic topic,
                                              java.lang.String name)

Creates a durable subscriber to the specified topic.

If a client needs to receive all the messages published on a topic, including the ones published while the subscriber is inactive, it uses a durable TopicSubscriber. The JMS provider retains a record of this durable subscription and insures that all messages from the topic's publishers are retained until they are acknowledged by this durable subscriber or they have expired.

Sessions with ...

Get Java™ Message Service API Tutorial and Reference: Messaging for the J2EE™ Platform now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.