MQSendMessageToDestinationExt (const MQProducerHandle producerHandle, const MQMessageHandle messageHandle, const MQDestinationHandle destinationHandle, MQDeliveryMode msgDeliveryMode, MQInt8 msgPriority, MQInt64 msgTimeToLive);
MQStatus. See the MQStatusIsError() function for more information.
The handle to the producer sending this message. This handle is passed back to you when you call the MQCreateMessageProducer() function.
A handle to the message you want to send.
A handle to the destination where you want to send the message.
An enum of either MQ_PERSISTENT_DELIVERY or MQ_NONPERSISTENT_DELIVERY.
A integer value of 0 through 9; 0 being the lowest priority and 9 the highest.
An integer value specifying in milliseconds how long the message will live before it expires. When a message is sent, its expiration time is calculated as the sum of its time-to-live value and current GMT. A value of 0 indicates that the message will never expire.
The MQSendMessageToDestinationExt function sends the specified message on behalf of the specified producer to the specified destination. Use this function if you want to change the default values for the message header properties as shown below:
0, meaning no expiration limit
If these default values suit you, you can use the MQSendMessageToDestination() function to send the message.
You cannot use this function with a producer that is created with a specified destination.
You can set the broker property MQ_ACK_ON_PRODUCE_PROPERTY to make sure that the message has reached its destination on the broker:
By default, the broker acknowledges receiving persistent messages only from the producing client.
If you set the property to MQ_TRUE, the broker acknowledges receipt of all messages (persistent and non-persistent) from the producing client.
If you set the property to MQ_FALSE, the broker does not acknowledge receipt of any message (persistent or non-persistent) from the producing client.
Note that “acknowledgement” in this case is not programmatic but internally implemented. That is, the client thread is blocked and does not return until the broker acknowledges messages it receives.
MQ_PRODUCER_HAS_DEFAULT_DESTINATION MQ_INVALID_PRIORITY MQ_INVALID_DELIVERY_MODE MQ_PRODUCER_CLOSED MQ_SESSION_CLOSED MQ_BROKER_CONNECTION_CLOSED MQ_THREAD_OUTSIDE_XA_TRANSACTION MQ_XA_SESSION_NO_TRANSATION