3.1.7.12 Message Position Available Event

This event is triggered when the Message Position Available ([MS-MQDMPR] section 3.1.7.2.2) event is raised and processes the same arguments as that event:

  • iQueue: A reference to the Queue ([MS-MQDMPR] section 3.1.1.2) ADM element instance in which the MessagePosition ([MS-MQDMPR] section 3.1.1.11) ADM element instance has become available.

  • iPosition: A reference to the MessagePosition ADM element instance that has become available.

Return Value:

  • None.

This event MUST be processed as follows:

  • If iQueue is not an OutgoingQueue ([MS-MQDMPR] section 3.1.1.3) ADM element instance, take no further action.

  • If iQueue.Multicast is True, take no further action.

  • If iQueue.State is Locked or OnHold, take no further action.

  • If iQueue.DestinationFormatName is a direct format name ([MS-MQMQ] section 2.1.2) and specifies usage of the HTTP or HTTPS protocol, take no further action.

  • If the iQueue.ConnectionHistory array is empty, the protocol MUST establish a connection to the remote queue manager, as specified in section 3.1.5.2.

  • An OutgoingMessagePosition (section 3.1.1.3.1.2) ADM element instance MUST be constructed as follows and then added to the OutgoingMessageTable ADM element:

    • The MessagePosition ADM attribute MUST be set to the available MessagePosition ADM element instance.

    • The UserMessage ADM attribute MUST be set to a UserMessage Packet ([MS-MQMQ] section 2.2.20) structure as constructed by an invocation of the Construction of a UserMessage Packet (section 3.1.7.11) event with an iMessage input argument set to iPosition.MessageReference.

    • The AwaitingAck, ReceivedSessionAck, ReceivedOrderAck, and Transmitted ADM attributes MUST be set to FALSE.

    • The SequenceNumber ADM attribute MUST be set to 0x0000.

    • The RecoverableSequenceNumber ADM attribute MUST be set to 0x0000.

    • The TxSequenceNumber ADM attribute MUST be set to 0x00000000.

  • The Add Message To Dispatch Collection ([MS-MQDMPR] section 3.1.7.1.28) event MUST be raised with the following arguments.

    • iPosition := A reference to OutgoingMessagePosition.MessagePosition.

    • iData := A reference to OutgoingMessagePosition.