Home
Overview
Purpose: The MQTM structure describes the data in the trigger message that is sent by the queue manager to a trigger-monitor application when a trigger event occurs for a queue. This structure is part of the WebSphere MQ Trigger Monitor Interface (TMI), which is one of the WebSphere MQ framework interfaces.
Format name: MQFMT_TRIGGER.
Character set and encoding: Character data in MQTM is in the character set of the queue manager that generates the MQTM. Numeric data in MQTM is in the machine encoding of the queue manager that generates the MQTM.
The character set and encoding of the MQTM are given by the CodedCharSetId and Encoding fields in:
- The MQMD (if the MQTM structure is at the start of the message data), or
- The header structure that precedes the MQTM structure (all other cases).
Usage: A trigger-monitor application might need to pass some or all of the information in the trigger message to the application that the trigger-monitor application starts. Information that might be needed by the started application includes QName, TriggerData, and UserData. The trigger-monitor application can pass the MQTM structure directly to the started application, or pass an MQTMC2 structure instead, depending on what is permitted by the environment and convenient for the started application. For information about MQTMC2, see MQTMC2 - Trigger message 2 (character format).
- On z/OS, for an MQAT_CICS application that is started using the CKTI transaction, the entire trigger message structure MQTM is made available to the started transaction; the information can be retrieved by using the EXEC CICS RETRIEVE command.
- On i5/OS, the trigger-monitor application provided with WebSphere MQ passes an MQTMC2 structure to the started application.
For information about using triggers, see the WebSphere MQ Application Programming Guide.
MQMD for a trigger message: The fields in the MQMD of a trigger message generated by the queue manager are set as follows:
Field in MQMD Value used StrucId MQMD_STRUC_ID Version MQMD_VERSION_1 Report MQRO_NONE MsgType MQMT_DATAGRAM Expiry MQEI_UNLIMITED Feedback MQFB_NONE Encoding MQENC_NATIVE CodedCharSetId Queue manager's CodedCharSetId attribute Format MQFMT_TRIGGER Priority Initiation queue's DefPriority attribute Persistence MQPER_NOT_PERSISTENT MsgId A unique value CorrelId MQCI_NONE BackoutCount 0 ReplyToQ Blanks ReplyToQMgr Name of queue manager UserIdentifier Blanks AccountingToken MQACT_NONE ApplIdentityData Blanks PutApplType MQAT_QMGR, or as appropriate for the message channel agent PutApplName First 28 bytes of the queue-manager name PutDate Date when trigger message is sent PutTime Time when trigger message is sent ApplOriginData Blanks An application that generates a trigger message is recommended to set similar values, except for the following:
- The Priority field can be set to MQPRI_PRIORITY_AS_Q_DEF (the queue manager will change this to the default priority for the initiation queue when the message is put).
- The ReplyToQMgr field can be set to blanks (the queue manager will change this to the name of the local queue manager when the message it put).
- Set the context fields as appropriate for the application.
Home