MsgType (MQLONG)
This indicates the type of the message. Message types are grouped as follows:
- MQMT_SYSTEM_FIRST
- Lowest value for system-defined message types.
- MQMT_SYSTEM_LAST
- Highest value for system-defined message types.
The following values are currently defined within the system range:
- MQMT_DATAGRAM
- The message is one that does not require a reply.
- MQMT_REQUEST
- The message is one that requires a reply.
Specify the name of the queue to which to send the reply in the ReplyToQ field. The Report field indicates how to set the MsgId and CorrelId of the reply.
- MQMT_REPLY
- The message is the reply to an earlier request message (MQMT_REQUEST). The message must be sent to the queue indicated by the ReplyToQ field of the request message. Use the Report field of the request to control how to set the MsgId and CorrelId of the reply. Note: The queue manager does not enforce the request-reply relationship; this is an application responsibility.
- MQMT_REPORT
- The message is reporting on some expected or unexpected occurrence, usually related to some other message (for example, a request message was received that contained data that was not valid). Send the message to the queue indicated by the ReplyToQ field of the message descriptor of the original message. Set the Feedback field s to indicate the nature of the report. Use the Report field of the original message to control how to set the MsgId and CorrelId of the report message.
Report messages generated by the queue manager or message channel agent are always sent to the ReplyToQ queue, with the Feedback and CorrelId fields set as described above.
Application-defined values can also be used. They must be within the following range:
- MQMT_APPL_FIRST
- Lowest value for application-defined message types.
- MQMT_APPL_LAST
- Highest value for application-defined message types.
For the MQPUT and MQPUT1 calls, the MsgType value must be within either the system-defined range or the application-defined range; if it is not, the call fails with reason code MQRC_MSG_TYPE_ERROR.
This is an output field for the MQGET call, and an input field for MQPUT and MQPUT1 calls. The initial value of this field is MQMT_DATAGRAM.
Parent topic: Fields for MQMD