You control trigger events using some of the attributes that define your application queue. You can enable and disable triggering, and you can select the number or priority of the messages that count toward a trigger event. There is a full description of these attributes in the WebSphere MQ Application Programming Reference.
The relevant attributes are:
EVERY | A trigger event occurs every time that a message arrives on the application queue. Use this type of trigger if you want a serving program to process only one message, then end. |
FIRST | A trigger event occurs only when the number of messages on the application queue changes from zero to one. Use this type of trigger if you want a serving program to start when the first message arrives on a queue, continue until there are no more messages to process, then end. Also see Special case of trigger type FIRST. |
DEPTH | A trigger event occurs only when the number of messages
on the application queue reaches the value of the TriggerDepth attribute.
A typical use of this type of triggering is to start a program when all the
replies to a set of requests are received.
Triggering
by depth
With triggering by depth, the queue manager disables triggering (using the TriggerControl attribute) after it creates a trigger message. Your application must re-enable triggering itself (by using the MQSET call) after this has happened. The action of disabling triggering is not under syncpoint control, so triggering cannot be re-enabled simply by backing out a unit of work. If a program backs out a put request that caused a trigger event, or if the program abends, you must re-enable triggering by using the MQSET call or the ALTER QLOCAL command. |
The conditions that must be satisfied for a queue manager to create a trigger message are described in Conditions for a trigger event.
Notices |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
conttrg |