3.1.5.7 Receiving a FinalAck 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).
A FinalAck Packet (section 2.2.5) indicates that the message represented by the FinalAck.MessagePropertiesHeader.MessageBody.MessageID field has been rejected by the receiver or removed from the destination queue.
The message where the UserMessage.UserHeader.MessageID field is equal to the FinalAck.MessagePropertiesHeader.MessageBody.MessageID field in the OutgoingMessageTable ADM element or the AwaitingFinalACKTable ADM element MUST be moved to the system journal queue if the UserMessage.UserHeader.Flags.JP bit field is set and the FinalAck.MessagePropertyHeader.MessageClass field is equal to MQMSG_CLASS_ACK_RECEIVE. The Move Message ([MS-MQDMPR] section 3.1.7.1.16) event MUST be raised with the following arguments:
iMessagePos: A MessagePosition ([MS-MQDMPR] section 3.1.1.11) ADM element instance referenced by the MessagePosition ADM attribute of the OutgoingMessagePosition ADM element instance in the OutgoingMessageTable ADM element or in the AwaitingFinalACKTable ADM element that contains the Message ([MS-MQDMPR] section 3.1.1.12) ADM element instance that is moved to the QueueManager.SystemJournalQueue ([MS-MQDMPR] section 3.1.1.1).
iTargetQueue: The target Queue ([MS-MQDMPR] section 3.1.1.2) ADM element instance MUST be set to the QueueManager.SystemJournalQueue.
The message where the UserMessage.UserHeader.MessageID field is equal to the FinalAck.MessagePropertiesHeader.MessageBody.MessageID field in the OutgoingMessageTable ADM element or in the AwaitingFinalACKTable ADM element MUST be moved to the dead letter Queue ADM element instance if the UserMessage.UserHeader.Flags.JN bit field is set and the FinalAck.MessagePropertyHeader.MessageClass field is not equal to MQMSG_CLASS_ACK_RECEIVE. The Move Message ([MS-MQDMPR] section 3.1.7.1.16) event MUST be raised with the following arguments:
iMessagePos: A MessagePosition ADM element instance referenced by the MessagePosition ADM attribute of the OutgoingMessagePosition ADM element instance in the OutgoingMessageTable ADM element or in the AwaitingFinalACKTable ADM element that contains the Message ADM element instance that is moved to the dead letter Queue ADM element instance.
iTargetQueue: The target Queue ADM element instance MUST be set to the QueueManager.SystemTransactionalDeadletterQueue or to iMessagePos.MessageReference.ApplicationDeadletterQueue ([MS-MQDMPR] section 3.1.1.12) if it is specified.