3.1.7.1.12 Dequeue Message End
This event MUST be generated with the following arguments:
iQueueDesc: A reference to an OpenQueueDescriptor (section 3.1.1.16) ADM element instance that specifies the Queue (section 3.1.1.2) ADM element instance for which the Message (section 3.1.1.12) ADM element dequeue operation ended.
iMessage: A reference to the Message ADM element instance for which the dequeue operation has ended.
iDeleteMessage: A Boolean that specifies whether to remove iMessage from the queue. This argument is ignored if the iTransactional argument is specified and set to True.
iTransactional (Optional): A Boolean that specifies whether the dequeue operation is part of a transactional message transfer.
Return Value:
rStatus: A status code that can be one of the following:
MQ_OK (0x00000000)
MQ_ERROR_TRANSACTION_SEQUENCE (0xC00E0051)
MQ_ERROR_QUEUE_NOT_AVAILABLE (0xC00E004B)
The queue manager MUST perform the following actions to process this event:
If iQueueDesc.QueueReference is NULL:
Set rStatus to MQ_ERROR_QUEUE_NOT_AVAILABLE (0xC00E004B).
Take no further action.
If the iMessage.MessagePositionReference.State value is Available:
Set rStatus to MQ_ERROR_TRANSACTION_SEQUENCE (0xC00E0051).
Take no further action.
If iTransactional is specified and equals True:
Set rStatus to MQ_OK.
Take no further action.
If the iDeleteMessage argument is True or the iMessage.MessagePositionReference.State value is PurgePending:
Generate a Message Position Deleted (section 3.1.7.2.1) event with the following arguments:
iQueue := iQueueDesc.QueueReference
iPosition := iMessage.MessagePositionReference
iReason := NackQueuePurged if the iMessage.MessagePositionReference.State value is PurgePending; otherwise, AckReceive.
Else:
Generate a Message Position Available (section 3.1.7.2.2) event with the following arguments:
iQueue := iQueueDesc.QueueReference
iPosition := iMessage.MessagePositionReference
Set rStatus to MQ_OK (0x00000000).