3.1.1.6.1 Session Acknowledgment

Session acknowledgments related to the session message sequence are specified in Session Message Sequence (section 3.1.1.7).

A session acknowledgment is sent from the receiver to the sender either as a stand-alone SessionAck Packet or as a SessionHeader ([MS-MQMQ] section 2.2.20.4) included inside a UserMessage Packet ([MS-MQMQ] section 2.2.20). The purpose of a session acknowledgment is to notify the sender that the receiver has received messages from the sender, and, in the case of recoverable messages, has persisted them for reliable recovery.

The SessionHeader.AckSequenceNumber field specifies the total number of messages that have been received on the session. The sender SHOULD<38> discard its local copy of express messages up to the position in the sequence specified by the receiver.

The SessionHeader.RecoverableMsgAckSeqNumber and SessionHeader.RecoverableMsgAckFlags fields specify the recoverable messages that the receiver has successfully saved to disk since the last session acknowledgment. The sender SHOULD<39> discard its local copy of the specified recoverable messages if they are not transactional. The sender MUST set SessionHeader.RecoverableMsgAckSeqNumber to 0x0000. The sender MUST set SessionHeader.RecoverableMsgAckFlags to 0x00000000.

The receiver sends session acknowledgments to the sender at intervals defined by an acknowledgment timer or based on message count and session window size.