3.1.7.1.11 Dequeue Message Begin

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 from which a message is dequeued.

  • iTimeout (Optional): The amount of time to wait in seconds.

  • iCursor (Optional): A reference to a Cursor (section 3.2) ADM element instance that is used for the dequeue operation.

  • iTag (Optional): A unique identifier passed by the invoker of this event that identifies this particular dequeue operation request.

  • iTransaction (Optional): A reference to a Transaction (section 3.1.1.14) ADM element instance that provides the unit of work for the dequeue operation.

Return Values:

  • rStatus: A status code that can be one of the following:

    • MQ_OK (0x00000000)

    • MQ_ERROR_IO_TIMEOUT (0xC00E001B)

    • MQ_ERROR_MESSAGE_NOT_FOUND (0xC00E0088)

    • MQ_ERROR_MESSAGE_ALREADY_RECEIVED (0xC00E001D)

    • MQ_ERROR_QUEUE_NOT_AVAILABLE (0xC00E004B)

  • rMessage: A reference to the dequeued Message (section 3.1.1.12) ADM element instance. This value is undefined if rStatus is not MQ_OK.

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 iTimeout input argument to this event is not supplied, set it to Infinite.

  • Generate the Dequeue Message (section 3.1.7.1.10) event with the following arguments:

    • iQueueDesc := iQueueDesc

    • iTimeout := iTimeout

    • If the iCursor input argument to this event is supplied: iCursor := iCursor

    • If the iTransaction input argument to this event is supplied: iTransaction := iTransaction

    • If the iTag input argument to this event is supplied: iTag := iTag

    • iTwoPhaseRead := True

  • Set rMessage to the rMessage returned from the Dequeue Message event.

  • Set rStatus to the rStatus returned from the Dequeue Message event.