3.1.1.6.2 Transactional Acknowledgment

Transactional acknowledgments related to the Transactional Message Sequence are specified in Transactional Message Sequence (section 3.1.1.5).

Transactional acknowledgments are end-to-end acknowledgments. Processing of transactional sequences MUST be done only by the original sender queue manager and the final destination queue manager. An intermediate queue manager that receives a Transactional Message MUST pass the TransactionHeader ([MS-MQMQ] section 2.2.20.5) to the next destination but MUST NOT perform any processing related to the transactional sequence.

A transactional acknowledgment is sent from the final destination to the sender in the form of an OrderAck Packet (section 2.2.4). The purpose of a transactional acknowledgment is to notify the original sender that the final destination has received a Transactional Message and has persisted it for reliable recovery.

An OrderAck Packet includes a TxSequenceID ([MS-MQMQ] section 2.2.18.1.2) and TxSequenceNumber that specify the Transactional Message being acknowledged. The receiver MUST acknowledge transactional messages in sequence order. For example, if the receiver has received messages 1, 2, and 4 within a sequence, it cannot send an acknowledgment for message 4 until it has received, saved to disk, and acknowledged message 3.

The receiver MUST schedule sending an OrderAck Packet based on the state of the Order Ack Send Timer (section 3.1.2.7) and the values of the LastOrderAckSendTime and MaximumOrderAckDelay ADM elements. If the timer is active and the time elapsed from the LastOrderAckSendTime ADM element is less than the MaximumOrderAckDelay ADM element, the timer MUST be restarted with the duration set to the OrderackTimeout ADM element. If the timer is inactive, it MUST be started with the duration set to the OrderackTimeout ADM element. When the timer expires, an OrderAck Packet MUST be sent as specified in section 3.1.6.9.

A transactional acknowledgment MAY acknowledge multiple messages if multiple messages have been received since the last OrderAck Packet was sent. For example, if the last message acknowledged is 5 and the receiver has received and saved to disk messages 6, 7, and 8, then the receiver MAY set the TxSequenceID field to 0x0000000000000008.

The TxSequenceID field specifies to the sender the highest message sequence number that has been received by the receiver and saved to disk. The sender SHOULD<40> discard its local copy of the acknowledged transactional messages up to the position in the sequence specified by the sender.

Transactional acknowledgments are independent of session acknowledgments. Although transactional messages are processed by the session acknowledgment mechanism as recoverable messages, they MUST NOT be discarded by the sender as a result of a session acknowledgment. Transactional messages MUST be retained by the sender at least until the sender receives a matching transactional OrderAck Packet. If the sender requests a final acknowledgment, the sender MUST retain the message until it receives the FinalAck Packet (section 2.2.5).