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.QueueSender Class Reference

A client uses a QueueSender object to send messages to a queue. More...

Inheritance diagram for TIBCO.EMS.QueueSender:

## Public Member Functions
override void | Send (Message message)
| Sends a message to the queue. Uses the QueueSender's default delivery mode, priority, and time to live. More...
override void | Send (Message message, int deliveryMode, int priority, long timeToLive)
| Sends a message to the queue, specifying delivery mode, priority, and time to live. More...
override void | Send (Message message, MessageDeliveryMode deliveryMode, int priority, long timeToLive)
| Sends a message to the queue, specifying delivery mode, priority, and time to live. More...
void | Send (TIBCO.EMS.Queue queue, Message message)
| Sends a message to a queue for an unidentified queue sender. Uses the QueueSender's default delivery mode, priority, and time to live. More...
void | Send (TIBCO.EMS.Queue queue, Message message, int deliveryMode, int priority, long timeToLive)
| Sends a message to a queue for an unidentified message producer. Uses the QueueSender's default delivery mode, priority, and time to live. More...
void | Send (TIBCO.EMS.Queue queue, Message message, MessageDeliveryMode deliveryMode, int priority, long timeToLive)
| Sends a message to a queue for an unidentified message producer. Uses the QueueSender's default delivery mode, priority, and time to live. More...
Public Member Functions inherited from TIBCO.EMS.MessageProducer
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, 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, 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, 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, ICompletionListener completionListener)
| Asynchronously 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
TIBCO.EMS.Queue | Queue`[get]`
| Gets the queue associated with this QueueSender. More...
Properties inherited from TIBCO.EMS.MessageProducer
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...
int | DeliveryMode`[get, set]`
| Get and set the delivery mode using integer value, as defined in DeliveryMode class More...
MessageDeliveryMode | MsgDeliveryMode`[get, set]`
| Get and set the delivery mode using one of the enum MessageDeliveryMode value. 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

A client uses a QueueSender object to send messages to a queue.

This class extends MessageProducer. It overloads more send methods, specializing the destination parameter to a queue.

Normally, the Queue is specified when a QueueSender is created. In this case, an attempt to use the send methods for an unidentified QueueSender will throw a UnsupportedOperationException.

If the QueueSender is created with an unidentified Queue, an attempt to use the send methods that assume that the Queue has been identified will throw a UnsupportedOperationException.

During the execution of its send method, a message must not be changed by other threads within the client. If the message is modified, the result of the send is undefined.

After sending a message, a client may retain and modify it without affecting the message that has been sent. The same message object may be sent multiple times.

The following message headers are set as part of sending a message: Destination, DeliveryMode, Expiration, Priority, MessageID and TimeStamp. When the message is sent, the values of these headers are ignored. After the completion of the send, the headers hold the values specified by the method sending the message. It is possible for the send method to not set the MessageID and TimeStamp if they are explicitly disabled by setting the MessageProducer.DisableMessageID or MessageProducer.DisableMessageTimestamp property.

Note: This class is provided for backward compatibility to support older EMS clients programs. New clients should use the MessageProducer class instead.

## Member Function Documentation

override void TIBCO.EMS.QueueSender.Send | ( | Message | message | ) |
| inline virtual

Sends a message to the queue. Uses the QueueSender's default delivery mode, priority, and time to live.

Parameters

  message | The message to send.

Reimplemented from TIBCO.EMS.MessageProducer.

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

Sends a message to the queue, 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 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.

Reimplemented from TIBCO.EMS.MessageProducer.

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

Sends a message to the queue, 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 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.

Reimplemented from TIBCO.EMS.MessageProducer.

void TIBCO.EMS.QueueSender.Send | ( | TIBCO.EMS.Queue | queue,
|  | Message | message
| ) |  |
| inline

Sends a message to a queue for an unidentified queue sender. Uses the QueueSender's default delivery mode, priority, and time to live.

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

Parameters

  queue | the queue to send this message to
  message | The message to send.

void TIBCO.EMS.QueueSender.Send | ( | TIBCO.EMS.Queue | queue,
|  | Message | message,
|  | int | deliveryMode,
|  | int | priority,
|  | long | timeToLive
| ) |  |
| inline

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

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

Parameters

  queue | the queue to send this message to
  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.

void TIBCO.EMS.QueueSender.Send | ( | TIBCO.EMS.Queue | queue,
|  | Message | message,
|  | MessageDeliveryMode | deliveryMode,
|  | int | priority,
|  | long | timeToLive
| ) |  |
| inline

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

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

Parameters

  queue | the queue to send this message to
  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.

## Property Documentation

TIBCO.EMS.Queue TIBCO.EMS.QueueSender.Queue
| get

Gets the queue associated with this QueueSender.

Each send call directs a message to a queue.

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

A client sets this queue when creating the sender, and cannot subsequently change it.

Returns
  this sender's queue