Trigger monitors on UNIX and Windows systems

 

The following trigger monitors are provided for the server environment:

amqstrg0

This is a sample trigger monitor that provides a subset of the function provided by runmqtrm. See Sample programs (all platforms except z/OS) for more information on amqstrg0.

runmqtrm

The syntax of this command is runmqtrm [-m QMgrName] [-q InitQ], where QMgrName is the queue manager and InitQ is the initiation queue. The default queue is SYSTEM.DEFAULT.INITIATION.QUEUE on the default queue manager. It calls programs for the appropriate trigger messages. This trigger monitor supports the default application type.

The command string passed by the trigger monitor to the operating system is built as follows:

  1. The ApplId from the relevant PROCESS definition (if created)

  2. The MQTMC2 structure, enclosed in quotation marks

  3. The EnvData from the relevant PROCESS definition (if created)

where ApplId is the name of the program to run as it would be entered on the command line.

The parameter passed is the MQTMC2 character structure. A command string is invoked that has this string, exactly as provided, in quotation marks, in order that the system command will accept it as one parameter.

The trigger monitor does not look to see if there is another message on the initiation queue until the completion of the application that it has just started. If the application has a lot of processing to do, the trigger monitor might not be able to keep up with the number of trigger messages arriving. You have two options:

  • Have more trigger monitors running

  • Run the started applications in the background

If you have more trigger monitors running, we can control the maximum number of applications that can run at any one time. If you run applications in the background, there is no restriction imposed by WebSphere MQ on the number of applications that can run.

To run the started application in the background on Windows systems, within the ApplId field, prefix the name of your application with a START command. For example:

  START ⁄B AMQSECHA

To run the started application in the background on UNIX systems, put an & at the end of the EnvData of the PROCESS definition.

Where a Windows path has spaces as a part of the path name, these should be enclosed in double quotes (") to ensure that it is handled as a single argument. For example, " C:\\Application Directory\Application.exe".

The following is an example of an APPLICID string where the file name includes spaces as a part of the path:

  START "" /B "C:\\Application Directory\Application.exe"

The syntax of the Windows START command in the example includes an empty double-quoted string. START specifies that the first argument in double quotes will be treated as the title of the new command. To ensure that Windows does not mistake the application path for a 'title' argument, you should add a title string in double quotes to the command before the application name.

The following trigger monitors are provided for the WebSphere MQ client:

runmqtmc

This is the same as runmqtrm except that it links with the WebSphere MQ client libraries.

 

Parent topic:

Trigger monitors


fg13970_