3.1.5.6 Receiving an OrderAck Packet

If the SessionState ADM element is not set to the value OPEN, the protocol MUST close the session as specified in Closing a Session (section 3.1.5.9).

The ADM elements and ADM attributes defined in Session State (section 3.1.1.3.1) MUST be updated as follows:

  • TxOutgoingSequence.TimeOfLastAck MUST be set to the local system time.

  • TxOutgoingSequence.ResendIntervalIndex MUST be incremented by 1. If the new value is greater than the number of entries in the ResendTimerTable ADM element, it MUST be set to the index of the last entry. TxOutgoingSequence.ResendInterval MUST be set to the value at the index corresponding to TxOutgoingSequence.ResendIntervalIndex in the ResendTimerTable ADM element.

  • The incoming OrderAck.MessagePropertiesHeader.MessageBody.TxSequenceNumber field MUST be compared against the stored value of TxOutgoingSequence.LastAck.SeqNo. When the stored value is less, it is replaced with the value of the incoming OrderAck.MessagePropertiesHeader.MessageBody.TxSequenceNumber field. The TxOutgoingSequence.UnackedSequence list MUST be iterated over, and all stored instances of SEQUENCE_INFO ([MS-MQMQ] section 2.2.5) MUST be deleted from the TxOutgoingSequence.UnackedSequence list for which the value of the SeqNo field is less than or equal to the TxOutgoingSequence.LastAck.SeqNo. The stored values MUST be deleted in a manner such that the relative ordering of the undeleted SEQUENCE_INFO instances is unaltered.

  • If TxOutgoingSequence.UnackedSequence is empty, indicating that there are no remaining messages to be resent, TxOutgoingSequence.ResendIntervalIndex MUST be set to the index of the first entry of the ResendTimerTable ADM element.

  • TxOutgoingSequence.LastAckCount MUST be incremented by 1.

  • The protocol MUST delete each OutgoingMessagePosition (section 3.1.1.3.1.2) ADM element instance rOutgoingMessagePosition from the OutgoingMessageTable ADM element where rOutgoingMessagePosition.TxSequenceNumber is greater than 0x00000000 and is less than or equal to the OrderAck.MessagePropertiesHeader.MessageBody.TxSequenceNumber field and where rOutgoingMessagePosition.ReceivedSessionAck is set to TRUE.

  • A message that is deleted from the OutgoingMessageTable ADM element and that has the UserMessage.UserHeader.Flags.JN field bit set or the UserMessage.UserHeader.Flags.JP field bit set MUST be copied to the AwaitingFinalACKTable ADM element.

  • If the OutgoingMessageTable ADM element contains no OutgoingMessagePosition ADM element instances where OutgoingMessagePosition.TxSequenceNumber is nonzero, the protocol MUST increment OutgoingTxSequenceID.Ordinal by 1 and MUST set the OutgoingTxSequenceNumber ADM element to the value 0x00000001.

The attributes of the OutgoingTransferInfo ([MS-MQDMPR] section 3.1.1.4) ADM element instance referenced by OutgoingQueueReference.OutgoingTransferInfoReference from the Session State (section 3.1.1.3.1) MUST be set as follows:

  • EodLastAckTime: This ADM attribute value MUST be set to TxOutgoingSequence.TimeOfLastAck.

  • EodLastAckCount: This ADM attribute value MUST be set to TxOutgoingSequence.LastAckCount.

  • EodNoAckCount: This ADM attribute value MUST be set to the number of entries in TxOutgoingSequence.UnackedSequence.

  • EodResendInterval: This ADM attribute value MUST be set to the value of TxOutgoingSequence.ResendInterval.

  • EodFirstNonAck: This ADM attribute value MUST be set to the value of the first entry in the TxOutgoingSequence.UnackedSequence list.

  • EodLastNonAck: This ADM attribute value MUST be set to the value of the last entry in the TxOutgoingSequence.UnackedSequence list.

  • EodLastAck: This ADM attribute value MUST be set to the value of TxOutgoingSequence.LastAck.

  • EodNoReadCount: This ADM attribute value MUST be set to the number of OutgoingMessagePosition ADM element instances in the AwaitingFinalACKTable ADM element instance that corresponds to the sequence represented by the per-session TxOutgoingSequence ADM element instance.

  • EodResendCount: This ADM attribute value MUST be set to the value of TxOutgoingSequence.ResendIntervalIndex.

  • EodResendTime: This ADM attribute value MUST be set to the value of TxOutgoingSequence.ResendTime.