TIBCO EMS .NET API 8.5 TIBCO EMS .NET API 8.5

- Main Page
- Related Pages
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
TIBCO.EMS.TopicSession Class Reference

A TopicSession object provides methods for creating TopicPublisher, TopicSubscriber. More...

Inheritance diagram for TIBCO.EMS.TopicSession:

## Public Member Functions
TopicSubscriber | CreateSubscriber (Topic topic)
| Create a nondurable subscriber to the specified topic. More...
TopicSubscriber | CreateSubscriber (Topic topic, string messageSelector, bool noLocal)
| Create a nondurable subscriber to the specified topic, using a message selector or specifying whether messages published by its own connection should be delivered to it. More...
TopicPublisher | CreatePublisher (Topic topic)
| Create a publisher for the specified topic. More...
Public Member Functions inherited from TIBCO.EMS.Session
QueueBrowser | CreateBrowser (TIBCO.EMS.Queue queue)
| Create a QueueBrowser object to peek at the messages on the specified queue. More...
QueueBrowser | CreateBrowser (TIBCO.EMS.Queue queue, string messageSelector)
| Create a QueueBrowser object to peek at the messages on the specified queue using a message selector. More...
MessageConsumer | CreateConsumer (Destination dest)
| Create a MessageConsumer for a specific destination. More...
MessageConsumer | CreateConsumer (Destination dest, string messageSelector)
| Create a MessageConsumer for a specific destination, using a message selector. More...
MessageConsumer | CreateConsumer (Destination dest, string messageSelector, bool noLocal)
| Create MessageConsumer for the specified destination, using a message selector. This method can specify whether messages published by its own connection should be delivered to it, if the destination is a topic More...
TemporaryTopic | CreateTemporaryTopic ()
| Create a TemporaryTopic object More...
TemporaryQueue | CreateTemporaryQueue ()
| Create a TemporaryQueue object More...
TopicSubscriber | CreateDurableSubscriber (Topic topic, string name)
| Create a durable subscriber to the specified topic More...
TopicSubscriber | CreateDurableSubscriber (Topic topic, string name, string messageSelector, bool noLocal)
| Create 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. More...
MessageConsumer | CreateSharedConsumer (Topic topic, string sharedSubscriptionName)
| Create a shared non-durable subscription (with the specified name on the specified topic - if one does not already exist), and a consumer on that subscription. More...
MessageConsumer | CreateSharedConsumer (Topic topic, string sharedSubscriptionName, string messageSelector)
| Create a shared non-durable subscription (with the specified name on the specified topic - if one does not already exist), and a consumer on that subscription, using the specidied message selector. More...
MessageConsumer | CreateSharedDurableConsumer (Topic topic, string name)
| Create a shared durable subscription (with the specified name on the specified topic - if one does not already exist), and a consumer on that subscription. More...
MessageConsumer | CreateSharedDurableConsumer (Topic topic, string name, string messageSelector)
| Create a shared durable subscription (with the specified name on the specified topic - if one does not already exist), and a consumer on that subscription, using the specified message selector. More...
Topic | CreateTopic (string topicName)
| Create a topic More...
TIBCO.EMS.Queue | CreateQueue (string queueName)
| Create a queue More...
MessageProducer | CreateProducer (Destination dest)
| Create a MessageProducer to send messages to the specified destination. More...
void | Unsubscribe (string name)
| Unsubscribe a durable topic subscription More...
BytesMessage | CreateBytesMessage ()
| Create a byte array message More...
MapMessage | CreateMapMessage ()
| Create a MapMessage object. A MapMessage object is used to send a self-defining set of name-value pairs, where names are String objects and values are primitive values in the .NET programming language. More...
Message | CreateMessage ()
| Create a Message object. The Message interface is the root interface of all TIBCO EMS messages. A Message object holds all the standard message header information. It can be sent when a message containing only header information is sufficient More...
ObjectMessage | CreateObjectMessage ()
| Create an ObjectMessage object. An ObjectMessage object is used to send a message that contains a serializable .NET object. More...
ObjectMessage | CreateObjectMessage (Object obj)
| Create an ObjectMessage object. An ObjectMessage object is used to send a message that contains a serializable .NET object. More...
StreamMessage | CreateStreamMessage ()
| Create a StreamMessage object More...
TextMessage | CreateTextMessage ()
| Create a TextMessage object More...
TextMessage | CreateTextMessage (string text)
| Create a TextMessage object More...
virtual void | Commit ()
| Commit the open transaction More...
virtual void | Rollback ()
| Roll back messages in the current transaction More...
void | Close ()
| Close a session and reclaim resources More...
void | Recover ()
| Recover from undetermined state during message processing More...
void | Run ()
| Obsolete: Not to be used by ordinary JMS Clients More...
override string | ToString ()
| Returns a string representation of this `Session` object. More...

## Additional Inherited Members
Public Attributes inherited from TIBCO.EMS.Session
const int | SESSION_TRANSACTED = 0
| The session is transacted More...
const int | AUTO_ACKNOWLEDGE = 1
| Automatic acknowledgment More...
const int | CLIENT_ACKNOWLEDGE = 2
| Client acknowledgment More...
const int | DUPS_OK_ACKNOWLEDGE = 3
| Duplication ok acknowledgment More...
const int | NO_ACKNOWLEDGE = 22
| No acknowledge acknowledge mode More...
const int | EXPLICIT_CLIENT_ACKNOWLEDGE = 23
| Explicit client acknowledge mode More...
const int | EXPLICIT_CLIENT_DUPS_OK_ACKNOWLEDGE = 24
| Explicit client acknowledge mode with dups_ok More...
Properties inherited from TIBCO.EMS.Session
Connection | Connection`[get]`
| Get the connection the session belongs to More...
bool | IsClosed`[get]`
bool | IsTransacted`[get]`
| Get whether the session is transacted More...
int | AcknowledgeMode`[get]`
| Get the acknowledge mode of the session as integer constants as defined in Session class. More...
SessionMode | SessionAcknowledgeMode`[get]`
| Get the acknowledge mode of the session as a SessionMode type More...
bool | Transacted`[get]`
| Get whether an open session is transacted More...
IMessageListener | MessageListener`[get, set]`
| Get or set the message listener for the session. -Deprecated, use MessageConsumer.MessageListener instead. More...

## Detailed Description

A TopicSession object provides methods for creating TopicPublisher, TopicSubscriber.

Note: The TopicSession class is for backwards compatibility to support older clients. New clients should use the Session class.

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

## Member Function Documentation

TopicPublisher TIBCO.EMS.TopicSession.CreatePublisher | ( | Topic | topic | ) |
| inline

Create a publisher for the specified topic.

A client uses a TopicPublisher object to publish messages on a topic. Each time a client creates a TopicPublisher on a topic, it defines a new sequence of messages that have no ordering relationship with the messages it has previously sent.

Parameters

  topic | the Topic to publish to, or null if this is an unidentified producer

TopicSubscriber TIBCO.EMS.TopicSession.CreateSubscriber | ( | Topic | topic | ) |
| inline

Create a nondurable subscriber to the specified topic.

A client uses a TopicSubscriber object to receive messages that have been published to a topic.

Regular TopicSubscriber objects are not durable. They receive only messages that are published while they are active.

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

Parameters

  topic | The Topic to subscribe to

Exceptions

  InvalidDestinationException | if an invalid topic is specified

TopicSubscriber TIBCO.EMS.TopicSession.CreateSubscriber | ( | Topic | topic,
|  | string | messageSelector,
|  | bool | noLocal
| ) |  |
| inline

Create a nondurable subscriber to the specified topic, using a message selector or specifying whether messages published by its own connection should be delivered to it.

A client uses a TopicSubscriber object to receive messages that have been published to a topic.

Regular TopicSubscriber objects are not durable. They receive only messages that are published while they are active. 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 NoLocal attribute allows a subscriber to inhibit the delivery of messages published by its own connection. The default value for this attribute is false.

Parameters

  topic | the Topic to subscribe to
  messageSelector | only messages with properties matching the message selector expression are delivered. A value of null or an empty string indicates that there is no message selector for the message consumer.
  noLocal | if set, inhibits the delivery of messages published by its own connection