3.2.4.2 Send Message

The initiator MUST perform the following steps.

  • If rMsmqMessage is equal to NULL:

    • Construct an MSMQ Message as specified in section 3.2.5.1 with the following parameters:

      • iQueueTransferProtocol set to rQueueTransferProtocol.

    • Set rMsmqMessage equal to rReturnMsmqMessage.

    • Set rTransaction equal to the returned rReturnTransaction.

    • Construct a Preamble Message, referred to as rPreamble using the logic described in section 3.2.4.2 of [MC-NMF].

    • Set rNetMsmqMessage.Preamble to rPreamble.

  • Append the envelope record passed from the higher level protocol to rNetMsmqMessage.EnvelopeRecords.

  • If the MSMQ Session policy assertion described in section 2.2.3.2 is not set:

    • Set rMsmqMessage.Body to rNetMsmqMessage.

    • Deliver rMsmqMessage by raising the Enqueue Message event from section 3.1.7.1.9 of [MS-MQDMPR] with the following parameters:

      • iQueue set to rSendQueue, the opened queue from section 3.2.4.1.

      • iMessage set to rMsmqMessage.

      • iTransaction set to rTransaction.

    • If the returned rStatus, is not equal to MQ_OK (0x00000000), then an error MUST be propagated to the higher layer.

    • Set rMsmqMessage equal to NULL.