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 | Properties | List of all members
TIBCO.EMS.UFO.MessageProducer Class Reference

Defines the root behavior of all message producers. More...

Inheritance diagram for TIBCO.EMS.UFO.MessageProducer:

## Public Member Functions
virtual void | Send (Destination dest, Message message)
| Sends a message to a destination for an unidentified message producer. Uses the MessageProducer's default delivery mode, priority, and time to live. More...
virtual void | Send (Destination dest, Message message, ICompletionListener completionListener)
| Asynchronously sends a message to a destination for an unidentified message producer. Uses the MessageProducer's default delivery mode, priority, and time to live. More...
virtual void | Send (Destination dest, Message message, int deliveryMode, int priority, long timeToLive)
| Sends a message to a destination for an unidentified message producer, specifying delivery mode, priority and time to live. More...
virtual void | Send (Destination dest, Message message, int deliveryMode, int priority, long timeToLive, ICompletionListener completionListener)
| Asynchronously sends a message to a destination for an unidentified message producer, specifying delivery mode, priority and time to live. More...
virtual void | Send (Destination dest, Message message, TIBCO.EMS.MessageDeliveryMode deliveryMode, int priority, long timeToLive)
| Sends a message to a destination for an unidentified message producer, specifying delivery mode, priority and time to live. More...
virtual void | Send (Destination dest, Message message, TIBCO.EMS.MessageDeliveryMode deliveryMode, int priority, long timeToLive, ICompletionListener completionListener)
| Asynchronously sends a message to a destination for an unidentified message producer, specifying delivery mode, priority and time to live. More...
virtual void | Send (Message message)
| Sends a message using the MessageProducer's default delivery mode, priority, and time to live. More...
virtual void | Send (Message message, ICompletionListener completionListener)
| Asynchronously sends a message using the MessageProducer's default delivery mode, priority, and time to live. More...
virtual void | Send (Message message, int deliveryMode, int priority, long timeToLive)
| Sends a message to the destination, specifying delivery mode, priority, and time to live. More...
virtual void | Send (Message message, int deliveryMode, int priority, long timeToLive, ICompletionListener completionListener)
| Asynchronously sends a message to the destination, specifying delivery mode, priority, and time to live. More...
virtual void | Send (Message message, TIBCO.EMS.MessageDeliveryMode deliveryMode, int priority, long timeToLive)
| Sends a message to the destination, specifying delivery mode, priority, and time to live. More...
virtual void | Send (Message message, MessageDeliveryMode deliveryMode, int priority, long timeToLive, ICompletionListener completionListener)
| Asynchronously sends a message to the destination, specifying delivery mode, priority, and time to live. More...
void | Close ()
| Closes the message producer. More...
override string | ToString ()
| returns a string representaion of the message producer More...

## Properties
int | DeliveryMode`[get, set]`
| Get and set the delivery mode using integer value, as defined in DeliveryMode class More...
Destination | Destination`[get]`
| Gets the destination associated with this MessageProducer. More...
bool | DisableMessageID`[get, set]`
| Get and Sets the disable message id flag More...
bool | DisableMessageTimestamp`[get, set]`
| Get and Sets the disable message timestamp flag More...
TIBCO.EMS.MessageDeliveryMode | MsgDeliveryMode`[get, set]`
| Get and set the delivery mode using one of the enum TIBCO.EMS.MessageDeliveryModevalue. More...
int | Priority`[get, set]`
| Gets and Sets the priority of the message producer. More...
long | TimeToLive`[get, set]`
| Gets and Sets the time to live property of the message producer. More...
long | DeliveryDelay`[get, set]`
| Gets and Sets the delivery delay property of the message producer. More...

## Detailed Description

Defines the root behavior of all message producers.

A client uses a MessageProducer object to send messages to a destination.

MessageProducer is the parent interface for all message producers. A client also has the option of creating a message producer without supplying a destination. In this case, a destination must be provided with every send operation. A typical use for this kind of message producer is to send replies to requests using the request's ReplyTo destination.

A client can specify a default delivery mode, priority, and time to live for messages sent by a message producer. It can also specify the delivery mode, priority, and time to live for an individual message.

A client can specify a time-to-live value in milliseconds for each message it sends. This value defines a message expiration time that is the sum of the message's time-to-live and the GMT when it is sent (for transacted sends, this is the time the client sends the message, not the time the transaction is committed).

This class lacks a constructor. Instead, clients create message producers using methods of a Session object; subclasses, such as QueueSession and TopicSession, each define methods to create corresponding producer subclasses.

## Member Function Documentation

void TIBCO.EMS.UFO.MessageProducer.Close | ( |  | ) |
| inline

Closes the message producer.

Destroy the producer object and reclaim resources.

Message producers rely on resources outside the client program. To reclaim these resources in a timely manner, we recommend that client programs explicitly close message producer objects (rather than waiting for garbage collection).

This function will not return until any incomplete asynchronous send operations for this MessageProducer have been completed and all completion listener callbacks have returned. Incomplete sends will be allowed to complete normally unless an error occurs.

A completion listener callback must not call close on its own MessageProducer. Doing so will throw an IllegalStateException.

virtual void TIBCO.EMS.UFO.MessageProducer.Send | ( | Destination | dest,
|  | Message | message
| ) |  |
| inline virtual

Sends a message to a destination for an unidentified message producer. Uses the MessageProducer's default delivery mode, priority, and time to live.

Typically, a message producer is assigned a destination at creation time; however, the TIBCO EMS .NET API also supports unidentified message producers, which require that the destination be supplied every time a message is sent.

Parameters

  dest | The destination (queue or topic) to send this message.
  message | The message to send.

virtual void TIBCO.EMS.UFO.MessageProducer.Send | ( | Destination | dest,
|  | Message | message,
|  | ICompletionListener | completionListener
| ) |  |
| inline virtual

Asynchronously sends a message to a destination for an unidentified message producer. Uses the MessageProducer's default delivery mode, priority, and time to live.

See TIBCO.EMS.ICompletionListener for more information about asynchronous sending.

Typically, a message producer is assigned a destination at creation time; however, the TIBCO EMS .NET API also supports unidentified message producers, which require that the destination be supplied every time a message is sent.

Parameters

  dest | The destination (queue or topic) to send this message.
  message | The message to send.
  completionListener | An ICompletionListener to be notified when the send has completed.

virtual void TIBCO.EMS.UFO.MessageProducer.Send | ( | Destination | dest,
|  | Message | message,
|  | int | deliveryMode,
|  | int | priority,
|  | long | timeToLive
| ) |  |
| inline virtual

Sends a message to a destination for an unidentified message producer, specifying delivery mode, priority and time to live.

Typically, a message producer is assigned a destination at creation time; however, the TIBCO EMS .NET API also supports unidentified message producers, which require that the destination be supplied every time a message is sent.

Parameters

  dest | The destination (queue or topic) to send this message.
  message | The message to send.
  deliveryMode | The delivery mode to use. This argument may be either an enumerated value (see TIBCO.EMS.MessageDeliveryMode) or an integer (see TIBCO.EMS.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 JMS 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. If the time-to-live is non-zero, the expiration is the sum of that time-to-live and the sending client's current time (GMT). This rule applies even within sessions with transaction semantics - the timer begins with the send call, not the commit call. If the time-to-live is zero, then expiration is also zero - indicating that the message never 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.

virtual void TIBCO.EMS.UFO.MessageProducer.Send | ( | Destination | dest,
|  | Message | message,
|  | int | deliveryMode,
|  | int | priority,
|  | long | timeToLive,
|  | ICompletionListener | completionListener
| ) |  |
| inline virtual

Asynchronously sends a message to a destination for an unidentified message producer, specifying delivery mode, priority and time to live.

See TIBCO.EMS.ICompletionListener for more information about asynchronous sending.

Typically, a message producer is assigned a destination at creation time; however, the TIBCO EMS .NET API also supports unidentified message producers, which require that the destination be supplied every time a message is sent.

Parameters

  dest | The destination (queue or topic) to send this message.
  message | The message to send.
  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 JMS 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. If the time-to-live is non-zero, the expiration is the sum of that time-to-live and the sending client's current time (GMT). This rule applies even within sessions with transaction semantics - the timer begins with the send call, not the commit call. If the time-to-live is zero, then expiration is also zero - indicating that the message never 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.

Parameters

  completionListener | An ICompletionListener to be notified when the send has completed.

virtual void TIBCO.EMS.UFO.MessageProducer.Send | ( | Destination | dest,
|  | Message | message,
|  | TIBCO.EMS.MessageDeliveryMode | deliveryMode,
|  | int | priority,
|  | long | timeToLive
| ) |  |
| inline virtual

Sends a message to a destination for an unidentified message producer, specifying delivery mode, priority and time to live.

Typically, a message producer is assigned a destination at creation time; however, the TIBCO EMS .NET API also supports unidentified message producers, which require that the destination be supplied every time a message is sent.

Parameters

  dest | The destination (queue or topic) to send this message.
  message | The message to send.
  deliveryMode | The delivery mode to use. This argument may be either an enumerated value (see TIBCO.EMS.MessageDeliveryMode) or an integer (see TIBCO.EMS.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 JMS 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. If the time-to-live is non-zero, the expiration is the sum of that time-to-live and the sending client's current time (GMT). This rule applies even within sessions with transaction semantics - the timer begins with the send call, not the commit call. If the time-to-live is zero, then expiration is also zero - indicating that the message never 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.

virtual void TIBCO.EMS.UFO.MessageProducer.Send | ( | Destination | dest,
|  | Message | message,
|  | TIBCO.EMS.MessageDeliveryMode | deliveryMode,
|  | int | priority,
|  | long | timeToLive,
|  | ICompletionListener | completionListener
| ) |  |
| inline virtual

Asynchronously sends a message to a destination for an unidentified message producer, specifying delivery mode, priority and time to live.

See TIBCO.EMS.ICompletionListener for more information about asynchronous sending.

Typically, a message producer is assigned a destination at creation time; however, the TIBCO EMS .NET API also supports unidentified message producers, which require that the destination be supplied every time a message is sent.

Parameters

  dest | The destination (queue or topic) to send this message.
  message | The message to send.
  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 JMS 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. If the time-to-live is non-zero, the expiration is the sum of that time-to-live and the sending client's current time (GMT). This rule applies even within sessions with transaction semantics - the timer begins with the send call, not the commit call. If the time-to-live is zero, then expiration is also zero - indicating that the message never 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.

Parameters

  completionListener | An ICompletionListener to be notified when the send has completed.

virtual void TIBCO.EMS.UFO.MessageProducer.Send | ( | Message | message | ) |
| inline virtual

Sends a message using the MessageProducer's default delivery mode, priority, and time to live.

Parameters

  message | The message to send

Reimplemented in TIBCO.EMS.UFO.QueueSender.

virtual void TIBCO.EMS.UFO.MessageProducer.Send | ( | Message | message,
|  | ICompletionListener | completionListener
| ) |  |
| inline virtual

Asynchronously sends a message using the MessageProducer's default delivery mode, priority, and time to live.

See TIBCO.EMS.ICompletionListener for more information about asynchronous sending.

Parameters

  message | The message to send
  completionListener | An ICompletionListener to be notified when the send has completed.

virtual void TIBCO.EMS.UFO.MessageProducer.Send | ( | Message | message,
|  | int | deliveryMode,
|  | int | priority,
|  | long | timeToLive
| ) |  |
| inline virtual

Sends a message to the destination, specifying delivery mode, priority, and time to live.

Parameters

  message | The message to send.
  deliveryMode | The delivery mode to use. This argument may be either an enumerated value (see TIBCO.EMS.MessageDeliveryMode) or an integer (see TIBCO.EMS.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 JMS 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. If the time-to-live is non-zero, the expiration is the sum of that time-to-live and the sending client's current time (GMT). This rule applies even within sessions with transaction semantics - the timer begins with the send call, not the commit call. If the time-to-live is zero, then expiration is also zero - indicating that the message never 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.

Reimplemented in TIBCO.EMS.UFO.QueueSender.

virtual void TIBCO.EMS.UFO.MessageProducer.Send | ( | Message | message,
|  | int | deliveryMode,
|  | int | priority,
|  | long | timeToLive,
|  | ICompletionListener | completionListener
| ) |  |
| inline virtual

Asynchronously sends a message to the destination, specifying delivery mode, priority, and time to live.

See TIBCO.EMS.ICompletionListener for more information about asynchronous sending.

Parameters

  message | The message to send.
  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 JMS 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. If the time-to-live is non-zero, the expiration is the sum of that time-to-live and the sending client's current time (GMT). This rule applies even within sessions with transaction semantics - the timer begins with the send call, not the commit call. If the time-to-live is zero, then expiration is also zero - indicating that the message never 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.

Parameters

  completionListener | An ICompletionListener to be notified when the send has completed.

virtual void TIBCO.EMS.UFO.MessageProducer.Send | ( | Message | message,
|  | TIBCO.EMS.MessageDeliveryMode | deliveryMode,
|  | int | priority,
|  | long | timeToLive
| ) |  |
| inline virtual

Sends a message to the destination, specifying delivery mode, priority, and time to live.

Parameters

  message | The message to send.
  deliveryMode | The delivery mode to use. This argument may be either an enumerated value (see TIBCO.EMS.MessageDeliveryMode) or an integer (see TIBCO.EMS.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 JMS 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. If the time-to-live is non-zero, the expiration is the sum of that time-to-live and the sending client's current time (GMT). This rule applies even within sessions with transaction semantics - the timer begins with the send call, not the commit call. If the time-to-live is zero, then expiration is also zero - indicating that the message never 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.

virtual void TIBCO.EMS.UFO.MessageProducer.Send | ( | Message | message,
|  | MessageDeliveryMode | deliveryMode,
|  | int | priority,
|  | long | timeToLive,
|  | ICompletionListener | completionListener
| ) |  |
| inline virtual

Asynchronously sends a message to the destination, specifying delivery mode, priority, and time to live.

See TIBCO.EMS.ICompletionListener for more information about asynchronous sending.

Parameters

  message | The message to send.
  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 JMS 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. If the time-to-live is non-zero, the expiration is the sum of that time-to-live and the sending client's current time (GMT). This rule applies even within sessions with transaction semantics - the timer begins with the send call, not the commit call. If the time-to-live is zero, then expiration is also zero - indicating that the message never 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.

Parameters

  completionListener | An ICompletionListener to be notified when the send has completed.

override string TIBCO.EMS.UFO.MessageProducer.ToString | ( |  | ) |
| inline

returns a string representaion of the message producer

## Property Documentation

long TIBCO.EMS.UFO.MessageProducer.DeliveryDelay
| get set

Gets and Sets the delivery delay property of the message producer.

Sets the minimum length of time in milliseconds that must elapse after a message is sent before the JMS provider may deliver the message to a consumer.

For transacted sends, this time starts when the client sends the message, not when the transaction is committed.

DeliveryDelay is set to zero by default.

int TIBCO.EMS.UFO.MessageProducer.DeliveryMode
| get set

Get and set the delivery mode using integer value, as defined in DeliveryMode class

Delivery mode instructs the server concerning persistent storage.

A client use this property to define a default delivery mode for messages that this producer sends. Individual sending calls can override this default value.

For values, see the TIBCO.EMS.DeliveryMode class.

Users are recommended to use the MessageDeliveryMode enum instead.

Destination TIBCO.EMS.UFO.MessageProducer.Destination
| get

Gets the destination associated with this MessageProducer.

Each send call directs a message to a destination (queue or topic).

This property defines a default destination for messages that this producer sends. Individual sending calls can override this default value.

Returns
  this producer's Destination

bool TIBCO.EMS.UFO.MessageProducer.DisableMessageID
| get set

Get and Sets the disable message id flag

Applications that do not require message IDs can reduce overhead costs by disabling IDs (set this property to true).

bool TIBCO.EMS.UFO.MessageProducer.DisableMessageTimestamp
| get set

Get and Sets the disable message timestamp flag

Applications that do not require timestamps can reduce overhead costs by disabling timestamps (set this property to true).

TIBCO.EMS.MessageDeliveryMode TIBCO.EMS.UFO.MessageProducer.MsgDeliveryMode
| get set

Get and set the delivery mode using one of the enum TIBCO.EMS.MessageDeliveryModevalue.

This parallel property accesses the same default value as TIBCO.EMS.DeliveryMode, but using enumerated values (instead of ordinary integers). We recommend it over the ordinary integer-valued accessor, because it enables .NET to do stronger type checking at compile time, which can enhance program reliability.

int TIBCO.EMS.UFO.MessageProducer.Priority
| get set

Gets and Sets the priority of the message producer.

Priority affects the order in which the server delivers messages to consumers (higher values first).

The JMS 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.

A client can use this property to define a default priority for messages that this producer sends. Individual sending calls can override this default value.

long TIBCO.EMS.UFO.MessageProducer.TimeToLive
| get set

Gets and Sets the time to live property of the message producer.

Time-to-live (in milliseconds) determines the expiration time of a message.

- If the time-to-live is non-zero, the expiration is the sum of that time-to-live and the sending client's current time (GMT). This rule applies even within sessions with transaction semantics - the timer begins with the send call, not the commit call.
- If the time-to-live is zero, then expiration is also zero - indicating that the message never 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.