An overview of triggering is given in Triggering channels, while it is described in depth in the WebSphere MQ Application Programming Guide. This description provides you with information specific to WebSphere MQ for UNIX(R) and Windows(R) systems.
You can create a process definition in WebSphere MQ, defining processes to be triggered. Use the MQSC command DEFINE PROCESS to create a process definition naming the process to be triggered when messages arrive on a transmission queue. The USERDATA attribute of the process definition should contain the name of the channel being served by the transmission queue.
Alternatively, for WebSphere MQ for UNIX systems and Windows, you can eliminate the need for a process definition by specifying the channel name in the TRIGDATA attribute of the transmission queue.
If you do not specify a channel name, the channel initiator searches the channel definition files until it finds a channel that is associated with the named transmission queue. `
Define the local queue (Q3), specifying that trigger messages are to be written to the default initiation queue SYSTEM.CHANNEL.INITQ, to trigger the application (process P1) that starts channel (QM3.TO.QM4):
DEFINE QLOCAL(QM4) TRIGGER INITQ(SYSTEM.CHANNEL.INITQ) PROCESS(P1) USAGE (XMITQ)
Define the application (process P1) to be started:
DEFINE PROCESS(P1) USERDATA(QM3.TO.QM4)
Define the local queue (Q3), specifying that trigger messages are to be written to the initiation queue (IQ) to trigger the application that starts channel (QM3.TO.QM4):
DEFINE QLOCAL(QM4) TRIGGER INITQ(SYSTEM.CHANNEL.INITQ) + USAGE (XMITQ) TRIGDATA(QM3.TO.QM4)
Triggering is implemented using the channel initiator process. This process is started with the MQSC command START CHINIT. Unless you are using the default initiation queue, specify the name of the initiation queue on the command. For example, to use the START CHINIT command to start queue IQ for the default queue manager, enter:
START CHINIT INITQ(IQ)
In WebSphere MQ for iSeries, UNIX systems, and Windows systems, a channel initiator is started automatically and the number of channel initiators that you can start is limited. The default limit is 3. You can change this using MAXINITIATORS in the qm.ini file for UNIX systems, and in the registry for Windows systems.
See the WebSphere MQ System Administration Guide for details of the run channel initiator command, and the other control commands.
The default channel initiator is started automatically when you start a queue manager. Similarly, it is stopped automatically when a queue manager is stopped.
However, if you need to stop a channel initiator but not the queue manager, you should inhibit the queue that the initiator queue is reading from. To do this, you disable the GET attribute of the initiation queue. To restart the channel initiator, simply use the runmqchi command.
The consequences of stopping a channel initiator are:
Notices |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
trgch9 |