Trigger monitor

The trigger monitor provided by non-z/OS® IBM® MQ products runs in the client environments for [IBM i] IBM i, UNIX, Linux®, and Windows systems.

To run the trigger monitor, issue one of these commands:
  • [IBM i]On IBM i:
    
    CALL PGM(QMQM/RUNMQTMC) PARM('-m' QmgrName '-q' InitQ)
    
  • [UNIX, Linux, Windows]On Windows, UNIX and Linux platforms:
    
    runmqtmc [-m QMgrName] [-q InitQ]
    

The default initiation queue is SYSTEM.DEFAULT.INITIATION.QUEUE on the default queue manager. The initiation queue is where the trigger monitor looks for trigger messages. It then calls programs for the appropriate trigger messages. This trigger monitor supports the default application type and is the same as runmqtrm except that it links the client libraries.

The command string, built by the trigger monitor, is as follows:
  1. The ApplicId from the relevant process definition. ApplicId is the name of the program to run, as it would be entered on the command line.
  2. The MQTMC2 structure, enclosed in quotation marks, obtained from the initiation queue. A command string is started that has this string, exactly as provided, in quotation marks in order that the system command accepts it as one parameter.
  3. The EnvrData from the relevant process definition.
The trigger monitor does not look to see if there is another message on the initiation queue until the completion of the application it has started. If the application has much processing to do, the trigger monitor might not keep up with the number of trigger messages arriving. There are two ways to deal with this situation:
  1. Have more trigger monitors running

    If you choose to have more trigger monitors running, you can control the maximum number of applications that can run at any one time.

  2. Run the started applications in the background

    If you choose to run applications in the background, IBM MQ imposes no restriction on the number of applications that can run.

To run the started application in the background on UNIX and Linux systems, you must put an & (ampersand) at the end of the EnvrData of the process definition.