MQMD settings in command messages to the queue manager

Applications that send command messages to the queue manager use the following settings of fields in the message descriptor (MQMD). Fields that are left as the default value, or can be set to any valid value in the usual way, are not listed here.

    Report
    See MsgType and CorrelId.

    MsgType
    MsgType should be set to either MQMT_REQUEST or MQMT_DATAGRAM. MQRC_MSG_TYPE_ERROR will be returned if MsgType is not set to one of these values.

    MsgType should be set to MQMT_REQUEST for a command message if a response is always required. The MQRO_PAN and MQRO_NAN flags in the Report field are not significant in this case.

    If MsgType is set to MQMT_DATAGRAM, responses depend on the setting of the MQRO_PAN and MQRO_NAN flags in the Report field:

    • MQRO_PAN alone means that the queue manager sends a response only if the command succeeds.
    • MQRO_NAN alone means that the queue manager sends a response only if the command fails.
    • If a command completes with a warning, a response is sent if either MQRO_PAN or MQRO_NAN is set.
    • MQRO_PAN + MQRO_NAN means that the queue manager sends a response whether the command succeeds or fails. This has the same effect from the queue manager's perspective as setting MsgType to MQMT_REQUEST.
    • If neither MQRO_PAN nor MQRO_NAN is set, no response is ever sent.

    Format
    Set to MQFMT_RF_HEADER_2

    MsgId
    This field is normally set to MQMI_NONE, so that the queue manager generates a unique value.

    CorrelId
    This field can be set to any value. If the sender's identity includes a CorrelId, specify this value, together with MQRO_PASS_CORREL_ID in the Report field, to ensure that it is set in all response messages sent by the queue manager to the sender.

    ReplyToQ
    This field defines the queue to which responses, if any, are to be sent. This might be the sender's queue; this has the advantage that the QName parameter can be omitted from the message. If, however, responses are to be sent to a different queue, the QName parameter is needed.

    ReplyToQMgr
    This field defines the queue manager for responses. If you leave this field blank (the default value), the local queue manager puts its own name in this field.

Parent topic: Queued publish/subscribe command messages