3.1.7.2.1 Checking for Message Expiration
The value of SRMPMessage.TimeToReachQueue controls the message lifetime. The protocol MUST check the message for expiration before sending.
For the purpose of this section, CURRENT_TIME is defined as the number of seconds elapsed since midnight (00:00:00), January 1, 1970 (Coordinated Universal Time).
If CURRENT_TIME minus SRMPMessage.SentTime is greater than SRMPMessage.TimeToReachQueue, the message has expired. An expired message MUST NOT be sent to the remote queue manager. An expired message MUST be journaled using the logic described in section 3.1.5.2. If the message is not removed from the OutgoingQueue by the steps in section 3.1.5.2, it MUST be deleted from the OutgoingQueue by raising a Message Position Deleted event as defined in [MS-MQDMPR] section 3.1.7.2.1 with the following arguments:
iQueue: A reference to the OutgoingQueue.
iPosition: The MessagePosition of the identified message.
iReason: NackReachQueueTimeout ([MS-MQDMPR] section 3.1.1.12).
If SRMPMessage.TransactionIdentifier is specified for the expired message, the protocol MUST raise a Stream Element Removed Event (section 3.1.7.6) with the following argument:
iQueue: A reference to the OutgoingQueue.