All Implemented Interfaces:
Session
TopicSession object provides methods for creating
TopicPublisher, TopicSubscriber, and
TemporaryTopic objects. It also provides a method for
deleting its client's durable subscribers.
A TopicSession is used for creating Pub/Sub specific
objects. In general, use the Session object, and
use TopicSession only to support
existing code. Using the Session object simplifies the
programming model, and allows transactions to be used across the two
messaging domains.
A TopicSession cannot be used to create objects specific to the
point-to-point domain. The following methods inherit from
Session, but must throw an
IllegalStateException
if used from TopicSession:
createBrowser
createQueue
createTemporaryQueue
| Method from javax.jms.TopicSession Summary: |
|---|
| createDurableSubscriber, createDurableSubscriber, createPublisher, createSubscriber, createSubscriber, createTemporaryTopic, createTopic, unsubscribe |
| Method from javax.jms.TopicSession Detail: |
|---|
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 Sessions with durable subscribers must always provide the same
client identifier. In addition, each client must specify a name that
uniquely identifies (within client identifier) each durable
subscription it creates. Only one session at a time can have a
A client can change an existing durable subscription by creating
a durable In some cases, a connection may both publish and subscribe to a
topic. The subscriber |
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 Sessions with durable subscribers must always provide the same
client identifier. In addition, each client must specify a name which
uniquely identifies (within client identifier) each durable
subscription it creates. Only one session at a time can have a
A client can change an existing durable subscription by creating
a durable |
A client uses a |
A client uses a Regular In some cases, a connection may both publish and subscribe to a
topic. The subscriber |
A client uses a Regular Messages filtered out by a subscriber's message selector will never be delivered to the subscriber. From the subscriber's perspective, they do not exist. In some cases, a connection may both publish and subscribe to a
topic. The subscriber |
TemporaryTopic object. Its lifetime will be that
of the TopicConnection unless it is deleted earlier. |
Topic name.
This facility is provided for the rare cases where clients need to dynamically manipulate topic identity. This allows the creation of a topic identity with a provider-specific name. Clients that depend on this ability are not portable. Note that this method is not for creating the physical topic.
The physical creation of topics is an administrative task and is not
to be initiated by the JMS API. The one exception is the
creation of temporary topics, which is accomplished with the
|
This method deletes the state being maintained on behalf of the subscriber by its provider. It is erroneous for a client to delete a durable subscription
while there is an active |