Home
Triggering channels
This explanation is intended as an overview of triggering concepts. You can find a complete description in the WebSphere MQ Application Programming Guide.
For platform-specific information see the following:
- For Windows systems and UNIX systems, Triggering channels
- For z/OS, Transmission queues and triggering channels
- For i5/OS, Triggering channels
Figure 1. The concepts of triggering
The objects required for triggering are shown in Figure 1. It shows the following sequence of events:
- The local queue manager places a message from an application or from a message channel agent (MCA) on the transmission queue.
- When the triggering conditions are fulfilled, the local queue manager places a trigger message on the initiation queue.
- The long-running channel initiator program monitors the initiation queue, and retrieves messages as they appear.
- The channel initiator processes the trigger messages according to information contained in them. This information may include the channel name, in which case the corresponding MCA is started.
- The local application or the MCA, having been triggered, retrieves the messages from the transmission queue.
To set up this scenario, we need to:
- Create the transmission queue with the name of the initiation queue (that is, SYSTEM.CHANNEL.INITQ) in the corresponding attribute.
- Ensure that the initiation queue (SYSTEM.CHANNEL.INITQ) exists.
- Ensure that the channel initiator program is available and running. The channel initiator program must be provided with the name of the initiation queue in its start command. On z/OS, the name of the initiation queue is fixed, so is not used on the start command.
- Optionally, create the process definition for the triggering, if it does not exist, and ensure that its UserData field contains the name of the channel it serves. Instead of creating a process definition, we can specify the channel name in the TriggerData attribute of the transmission queue. WebSphere MQ for iSeries, UNIX systems, and Windows systems, allow the channel name to be specified as blank, in which case the first available channel definition with this transmission queue is used.
- Ensure that the transmission queue definition contains the name of the process definition to serve it, (if applicable), the initiation queue name, and the triggering characteristics you feel are most suitable. The trigger control attribute allows triggering to be enabled, or not, as necessary.
- The channel initiator program acts as a 'trigger monitor' monitoring the initiation queue used to start channels.
- An initiation queue and trigger process can be used to trigger any number of channels.
- Any number of initiation queues and trigger processes can be defined.
- A trigger type of FIRST is recommended, to avoid flooding the system with channel starts.
Parent topic:
Making your applications communicate
ic10580_
Home