Starting a trigger monitor

To start a trigger monitor, we must first create a service that will start the trigger monitor.


To start a trigger monitor from IBM MQ Explorer, we must first create a service that will run the runmqtrm command (to start the trigger monitor) when the service starts.

Note that if we are starting a trigger monitor for a client, use the runmqtmc command instead. For more information about trigger monitors, see Trigger monitors.

To start a trigger monitor, complete the following steps.

Note: When the trigger monitor runs as a service, the started process or application runs in the background.


Procedure

  1. In the Navigator view, expand the queue manager on which we want to start the trigger monitor service.
  2. Right-click the queue manager's Services folder, then click New... > Service. The New Service dialog opens.
  3. In the New Service dialog, type a name for the service, for example, TriggerMonitor, then click Next. We can now configure the new service.
  4. Optional: In the Description field, type a description of the service, for example, A trigger monitor for queue manager QM1.
  5. In the Service control field, configure how the service starts and stops:

    • To start and stop the service automatically when the queue manager starts and stops, click Queue Manager
    • To start the service automatically when the queue manager starts but not to stop when the queue manager stops, click Queue Manager Start
    • To configure the service so that we must manually start and stop it, click Manual.

  6. In the Start Command field, type the full path to the runmqtrm command.

    • Type: MQ_INSTALLATION_PATH\bin\runmqtrm where MQ_INSTALLATION_PATH is replaced by the high-level directory in which IBM MQ is installed.

  7. If the queue manager is not the default queue manager, in the Start args field, type -m queue_manager_name where queue_manager_name is the name of the queue manager.
  8. To use a queue other than SYSTEM.DEFAULT.INITATION.QUEUE as the initiation queue, in the Start args field, type -q initq_name where initq_name is the name of the queue.
  9. In the Service Type field, select the type of service to run:

    • If you select Command, we can run multiple instances of the service but we cannot view the status of the service in IBM MQ Explorer.
    • If you select Server, we can run only one instance of the service but we can view the status of the service in IBM MQ Explorer.

  10. Click Finish. The new service is created on the selected queue manager.
  11. Start the service. For instructions, see Start and stop a custom service.


Results

The service starts and runs the runmqtrm command, which starts the trigger monitor on the queue manager.

When you have started a trigger monitor, it just continues monitoring the specified initiation queue. We cannot stop a trigger monitor directly. When you stop the trigger monitor's queue manager, the trigger monitor stops too.

Parent topic: Start and stop objects and services


Related concepts