An application uses a message producer to send messages to a destination.
xms::PropertyContext | +----xms::MessageProducer
For a list of the XMS defined properties of a MessageProducer object, see Properties of MessageProducer.
Method | Description |
---|---|
close | Close the message producer. |
getDeliveryMode | Get the default delivery mode for messages sent by the message producer. |
getDestination | Get the destination for the message producer. |
getDisableMsgID | Get an indication of whether a receiving application requires message identifiers to be included in messages sent by the message producer. |
getDisableMsgTS | Get an indication of whether a receiving application requires time stamps to be included in messages sent by the message producer. |
getHandle | Get the handle that a C application would use to access the message producer. |
getPriority | Get the default priority for messages sent by the message producer. |
getTimeToLive | Get the default length of time that a message exists before it expires. |
isNull | Determine whether the MessageProducer object is a null object. |
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. |
setDeliveryMode | Set the default delivery mode for messages sent by the message producer. |
setDisableMsgID | Indicate whether a receiving application requires message identifiers to be included in messages sent by the message producer. |
setDisableMsgTS | Indicate whether a receiving application requires time stamps to be included in messages sent by the message producer. |
setPriority | Set the default priority for messages sent by the message producer. |
setTimeToLive | Set the default length of time that a message exists before it expires. |
xmsINT getDeliveryMode() const;
Get the default delivery mode for messages sent by the message producer.
For a real-time connection to a broker, the method always returns XMSC_DELIVERY_NOT_PERSISTENT.
xmsBOOL getDisableMsgID() const;
Get an indication of whether a receiving application requires message identifiers to be included in messages sent by the message producer.
xmsBOOL getDisableMsgTS() const;
Get an indication of whether a receiving application requires time stamps to be included in messages sent by the message producer.
xmsLONG getTimeToLive() const;
Get the default length of time that a message exists before it expires. The time is measured from when the message producer sends the message.
For a real-time connection to a broker, the method always returns 0.
xmsVOID send(const Message & message) const;
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.
xmsVOID send(const Message & message, const xmsINT deliveryMode, const xmsINT priority, const xmsLONG timeToLive) const;
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 XMSC_DELIVERY_NOT_PERSISTENT.
xmsVOID send(const Destination & destination, const Message & message) const;
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.
xmsVOID send(const Destination & destination, const Message & message, const xmsINT deliveryMode, const xmsINT priority, const xmsLONG timeToLive) const;
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 XMSC_DELIVERY_NOT_PERSISTENT.
xmsVOID setDeliveryMode(const xmsINT deliveryMode);
Set the default delivery mode for messages sent by the message producer.
For a real-time connection to a broker, the value must be XMSC_DELIVERY_NOT_PERSISTENT.
The default value is XMSC_DELIVERY_PERSISTENT, except for a real-time connection to a broker for which the default value is XMSC_DELIVERY_NOT_PERSISTENT.
xmsVOID setDisableMsgID(const xmsBOOL msgIDDisabled);
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.
xmsVOID setDisableMsgTS(const xmsBOOL timeStampDisabled);
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.
xmsVOID setPriority(const xmsINT priority);
Set the default priority for messages sent by the message producer.
On a real-time connection to a broker, the priority of a message is ignored.
xmsVOID setTimeToLive(const xmsLONG timeToLive);
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.