An application uses a message producer to send messages to a destination.
IBM.XMS.IPropertyContext | +----IBM.XMS.IMessageProducer
For a list of the XMS defined properties of a MessageProducer object, see Properties of MessageProducer.
.NET properties | Description |
---|---|
DeliveryMode | Get and set the default delivery mode for messages sent by the message producer. |
Destination | Get the destination for the message producer. |
DisableMsgID | Get an indication of whether a receiving application requires message identifiers to be included in messages sent by the message producer, and indicate whether a receiving application requires message identifiers to be included in messages sent by the message producer. |
DisableMsgTS | Get an indication of whether a receiving application requires time stamps to be included in messages sent by the message producer, and indicate whether a receiving application requires time stamps to be included in messages sent by the message producer. |
Priority | Get and set the default priority for messages sent by the message producer. |
TimeToLive | Get and set the default length of time that a message exists before it expires. |
DeliveryMode DeliveryMode { get; set; }
Get and set the default delivery mode for messages sent by the message producer.
The default delivery mode has one of the following values:
For a real-time connection to a broker, the value must be DeliveryMode.NonPersistent.
The default value is DeliveryMode.Persistent, except for a real-time connection to a broker for which the default value is DeliveryMode.NonPersistent.
Boolean DisableMessageID { get; set; }
Get an indication of whether a receiving application requires message identifiers to be included in messages sent by the message producer, and indicate whether a receiving application requires message identifiers to be included in messages sent by the message producer.
On a connection to a queue manager, or on a real-time connection to a broker, this flag is ignored. On a connection to a service integration bus, the flag is honoured.
DisabledMsgID has the following values:
Boolean DisableMessageTimestamp { get; set; }
Get an indication of whether a receiving application requires time stamps to be included in messages sent by the message producer, and indicate whether a receiving application requires time stamps to be included in messages sent by the message producer.
On a real-time connection to a broker, this flag is ignored. On a connection to a queue manager, or on a connection to a service integration bus, the flag is honoured.
DisableMsgTS has the following values:
Int32 Priority { get; set; }
Get and set the default priority for messages sent by the message producer.
The value of the default message priority is an integer in the range 0, the lowest priority, to 9, the highest priority.
On a real-time connection to a broker, the priority of a message is ignored.
Int64 TimeToLive { get; set; }
Get and set the default length of time that a message exists before it expires.
The time is measured from when the message producer sends the message and is the default time to live in milliseconds. A value of 0 means that a message never expires.
For a real-time connection to a broker, this value is always 0.
Method | Description |
---|---|
Close | Close the message producer. |
Send | Send a message to the destination that was specified when the message producer was created. Send the message using the message producer's default delivery mode, priority, and time to live. |
Send | Send a message to the destination that was specified when the message producer was created. Send the message using the specified delivery mode, priority, and time to live. |
Send | Send a message to a specified destination if you are using a message producer for which no destination was specified when the message producer was created. Send the message using the message producer's default delivery mode, priority, and time to live. |
Send | Send a message to a specified destination if you are using a message producer for which no destination was specified when the message producer was created. Send the message using the specified delivery mode, priority, and time to live. |
void Send(IMessage msg) ;
Send a message to the destination that was specified when the message producer was created. Send the message using the message producer's default delivery mode, priority, and time to live.
void Send(IMessage msg, DeliveryMode deliveryMode, Int32 priority, Int64 timeToLive);
Send a message to the destination that was specified when the message producer was created. Send the message using the specified delivery mode, priority, and time to live.
For a real-time connection to a broker, the value must be DeliveryMode.NonPersistent.
void Send(IDestination dest, IMessage msg) ;
Send a message to a specified destination if you are using a message producer for which no destination was specified when the message producer was created. Send the message using the message producer's default delivery mode, priority, and time to live.
Typically, you specify a destination when you create a message producer but, if you do not, you must specify a destination every time you send a message.
void Send(IDestination dest, IMessage msg, DeliveryMode deliveryMode, Int32 priority, Int64 timeToLive) ;
Send a message to a specified destination if you are using a message producer for which no destination was specified when the message producer was created. Send the message using the specified delivery mode, priority, and time to live.
Typically, you specify a destination when you create a message producer but, if you do not, you must specify a destination every time you send a message.
For a real-time connection to a broker, the value must be DeliveryMode.NonPersistent.