TIBCO EMS .NET API 10.2
TIBCO EMS .NET API 10.2
|
A client uses a TopicPublisher object to publish messages on a topic. A TopicPublisher object is the publish-subscribe form of a message producer. More...
Public Member Functions | |
void | Publish (Message message) |
Publishes a message to the topic. Uses the TopicPublisher's default delivery mode, priority, and time to live. More... | |
void | Publish (Message message, int deliveryMode, int priority, long timeToLive) |
Publishes a message to the topic, specifying delivery mode, priority, and time to live. More... | |
void | Publish (Message message, MessageDeliveryMode deliveryMode, int priority, long timeToLive) |
Publishes a message to the topic, specifying delivery mode, priority, and time to live. More... | |
void | Publish (Topic topic, Message message) |
Publishes a message to a topic for an unidentified message producer. Uses the TopicPublisher's default delivery mode, priority, and time to live. More... | |
void | Publish (Topic topic, Message message, int deliveryMode, int priority, long timeToLive) |
Publishes a message to a topic for an unidentified message producer, specifying delivery mode, priority and time to live. More... | |
void | Publish (Topic topic, Message message, MessageDeliveryMode deliveryMode, int priority, long timeToLive) |
Publishes a message to a topic for an unidentified message producer, specifying delivery mode, priority and time to live. More... | |
Properties | |
Topic | Topic [get] |
Gets the topic associated with this TopicPublisher. More... | |
A client uses a TopicPublisher object to publish messages on a topic. A TopicPublisher object is the publish-subscribe form of a message producer.
This class extends MessageProducer. It overloads more send methods, specializing the destination parameter to a queue.
Normally, the Topic is specified when a TopicPublisher is created. In this case, an attempt to use the publish methods for an unidentified TopicPublisher will throw a UnsupportedOperationException.
If the TopicPublisher is created with an unidentified Topic, an attempt to use the publish methods that assume that the Topic has been identified will throw a UnsupportedOperationException.
During the execution of its publish method, a message must not be changed by other threads within the client. If the message is modified, the result of the publish is undefined.
After publishing a message, a client may retain and modify it without affecting the message that has been published. The same message object may be published multiple times.
The following message headers are set as part of publishing a message: Destination, DeliveryMode, Expiration, Priority, MessageID and TimeStamp. When the message is published, the values of these headers are ignored. After completion of the publish, the headers hold the values specified by the method publishing the message. It is possible for the publish method to not set the MessageID and TimeStamp if they are explicitly disabled by setting the MessageProducer.DisableMessageID or MessageProducer.DisableMessageTimestamp property.
Creating a MessageProducer provides the same features as creating a TopicPublisher. A MessageProducer object is recommended when creating new code. The TopicPublisher is provided to support existing code. Because TopicPublisher inherits from MessageProducer, it inherits the send methods that are a part of the MessageProducer interface. Using the send methods will have the same effect as using the publish methods: they are functionally the same
Note: This class is provided for backward compatibility to support older EMS clients programs. New clients should use the MessageProducer class instead.
|
inline |
Publishes a message to the topic. Uses the TopicPublisher's default delivery mode, priority, and time to live.
message | The message to publish. |
|
inline |
Publishes a message to the topic, specifying delivery mode, priority, and time to live.
message | The message to publish. |
deliveryMode | The delivery mode to use. This argument may be either an enumerated value (see MessageDeliveryMode) or an integer (see DeliveryMode). We recommend enumerated values, because they enable .NET to do stronger type checking at compile time, which can enhance program reliability. |
priority | The priority for this message. Priority affects the order in which the server delivers messages to consumers (higher values first). The Jakarta Messaging specification defines ten levels of priority value, from zero (lowest priority) to 9 (highest priority). The specification suggests that clients consider 0-4 as gradations of normal priority, and priorities 5-9 as gradations of expedited priority. |
timeToLive | The message's lifetime (in milliseconds) before it expires.
|
Programs can use this property to define a default time-to-live for messages that this producer sends. Individual sending calls can override this default value.
Whenever your application uses non-zero values for message expiration or time-to-live, you must ensure that clocks are synchronized among all the host computers that send and receive messages. Synchronize clocks to a tolerance that is a very small fraction of the smallest or time-to-live.
|
inline |
Publishes a message to the topic, specifying delivery mode, priority, and time to live.
message | The message to publish. |
deliveryMode | The delivery mode to use. This argument may be either an enumerated value (see MessageDeliveryMode) or an integer (see DeliveryMode). We recommend enumerated values, because they enable .NET to do stronger type checking at compile time, which can enhance program reliability. |
priority | The priority for this message. Priority affects the order in which the server delivers messages to consumers (higher values first). The Jakarta Messaging specification defines ten levels of priority value, from zero (lowest priority) to 9 (highest priority). The specification suggests that clients consider 0-4 as gradations of normal priority, and priorities 5-9 as gradations of expedited priority. |
timeToLive | The message's lifetime (in milliseconds) before it expires.
|
Programs can use this property to define a default time-to-live for messages that this producer sends. Individual sending calls can override this default value.
Whenever your application uses non-zero values for message expiration or time-to-live, you must ensure that clocks are synchronized among all the host computers that send and receive messages. Synchronize clocks to a tolerance that is a very small fraction of the smallest or time-to-live.
Publishes a message to a topic for an unidentified message producer. Uses the TopicPublisher's default delivery mode, priority, and time to live.
Typically, a message producer is assigned a topic at creation time; however, the TIBCO EME .NET API also supports unidentified message producers, which require that the topic be supplied every time a message is published.
topic | The Topic to which this message is to be published. |
message | The message to publish. |
|
inline |
Publishes a message to a topic for an unidentified message producer, specifying delivery mode, priority and time to live.
Typically, a message producer is assigned a topic at creation time; however, the TIBCO EME .NET API also supports unidentified message producers, which require that the topic be supplied every time a message is published.
topic | The Topic to which this message is to be published |
message | The message to publish. |
deliveryMode | The delivery mode to use. This argument may be either an enumerated value (see MessageDeliveryMode) or an integer (see DeliveryMode). We recommend enumerated values, because they enable .NET to do stronger type checking at compile time, which can enhance program reliability. |
priority | The priority for this message. Priority affects the order in which the server delivers messages to consumers (higher values first). The Jakarta Messaging specification defines ten levels of priority value, from zero (lowest priority) to 9 (highest priority). The specification suggests that clients consider 0-4 as gradations of normal priority, and priorities 5-9 as gradations of expedited priority. |
timeToLive | The message's lifetime (in milliseconds) before it expires.
|
Programs can use this property to define a default time-to-live for messages that this producer sends. Individual sending calls can override this default value.
Whenever your application uses non-zero values for message expiration or time-to-live, you must ensure that clocks are synchronized among all the host computers that send and receive messages. Synchronize clocks to a tolerance that is a very small fraction of the smallest or time-to-live.
|
inline |
Publishes a message to a topic for an unidentified message producer, specifying delivery mode, priority and time to live.
Typically, a message producer is assigned a topic at creation time; however, the TIBCO EME .NET API also supports unidentified message producers, which require that the topic be supplied every time a message is published.
topic | The Topic to which this message is to be published |
message | The message to publish. |
deliveryMode | The delivery mode to use. This argument may be either an enumerated value (see MessageDeliveryMode) or an integer (see DeliveryMode). We recommend enumerated values, because they enable .NET to do stronger type checking at compile time, which can enhance program reliability. |
priority | The priority for this message. Priority affects the order in which the server delivers messages to consumers (higher values first). The Jakarta Messaging specification defines ten levels of priority value, from zero (lowest priority) to 9 (highest priority). The specification suggests that clients consider 0-4 as gradations of normal priority, and priorities 5-9 as gradations of expedited priority. |
timeToLive | The message's lifetime (in milliseconds) before it expires.
|
Programs can use this property to define a default time-to-live for messages that this producer sends. Individual sending calls can override this default value.
Whenever your application uses non-zero values for message expiration or time-to-live, you must ensure that clocks are synchronized among all the host computers that send and receive messages. Synchronize clocks to a tolerance that is a very small fraction of the smallest or time-to-live.
|
get |
Gets the topic associated with this TopicPublisher.
Each send call directs a message to a topic.
A client can use this property to define a default topic for messages that this publisher sends. Individual sending calls can override this default value.
A client sets this topic when creating the publisher, and cannot subsequently change it.