WebLogic Messaging API Class Library

ISession.\xA0Method

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 IMessageConsumer. The JMS server 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 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 an IMessageConsumer for a particular durable subscription.

A client can change an existing durable subscription by creating a durable IMessageConsumer with the same name and a new topic and/or message selector. Changing a durable subscriber is equivalent to unsubscribing (deleting) the old one and creating a new one.

In some cases, a connection may both publish and subscribe to a topic. The subscriber NoLocal attribute allows a subscriber to inhibit the delivery of messages published by its own connection. The default value for this attribute is false.

Overload List

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 IMessageConsumer. The JMS server 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 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 an IMessageConsumer for a particular durable subscription. A client can change an existing durable subscription by creating a durable IMessageConsumer with the same name and a new topic and/or message selector. Changing a durable subscriber is equivalent to unsubscribing (deleting) the old one and creating a new one. In some cases, a connection may both publish and subscribe to a topic. The subscriber NoLocal attribute allows a subscriber to inhibit the delivery of messages published by its own connection. The default value for this attribute is false.

IMessageConsumer\xA0(ITopic,String);

Creates a durable subscriber to the specified topic, using a message selector and specifying whether messages published by its own connection should be delivered to it. 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 IMessageConsumer. The JMS server 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 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 IMessageConsumer for a particular durable subscription. An inactive durable subscriber is one that exists but does not currently have a message consumer associated with it. A client can change an existing durable subscription by creating a durable IMessageConsumer with the same name and a new topic and/or message selector. Changing a durable subscriber is equivalent to unsubscribing (deleting) the old one and creating a new one.

IMessageConsumer\xA0(ITopic,String,String,Boolean);

See Also

ISession Interface | WebLogic.Messaging Namespace | Deleting durable subscriptions.