The MQRollBackSession function rolls back a transaction associated with the specified session.
MQRollBackSession(const MQSessionHandle sessionHandle); |
MQStatus. See the MQStatusIsError() function for more information.
The handle to the transacted session that you want to roll back.
A transacted session groups messages into an atomic unit known as a transaction. As messages are produced or consumed within a transaction, the broker tracks the various sends and receives, completing these operations only when you call the MQCommitSession() function.
If a send or receive operation fails, you must use the MQRollBackSession function to roll back the entire transaction. This means that those messages that have been sent are destroyed and those messages that have been consumed are automatically recovered.
MQ_NOT_TRANSACTED_SESSION MQ_CONCURRENT_ACCESS MQ_SESSION_CLOSED MQ_BROKER_CONNECTION_CLOSED MQ_XA_SESSION_IN_PROGRESS