Starting and stopping a queue manager

Use this topic as an introduction to stopping and starting a queue manager.

Starting a queue manager

To start a queue manager, use the strmqm command as follows:

strmqm saturn.queue.manager
On IBM® MQ for Windows and IBM MQ for Linux® (x86 and x86-64 platforms) systems, you can start a queue manager as follows:
  1. Open the IBM MQ Explorer.
  2. Select the queue manager from the Navigator View.
  3. Click Start . The queue manager starts.

If the queue manager start-up takes more than a few seconds IBM MQ issues information messages intermittently detailing the start-up progress.

The strmqm command does not return control until the queue manager has started and is ready to accept connection requests.

Starting a queue manager automatically

In IBM MQ for Windows you can start a queue manager automatically when the system starts using the IBM MQ Explorer. For more information, see Administration using the MQ Explorer.

Stopping a queue manager

Use the endmqm command to stop a queue manager.

Note: You must use the endmqm command from the installation associated with the queue manager that you are working with. You can find out which installation a queue manager is associated with using the dspmq -o installation command.
For example, to stop a queue manager called QMB, enter the following command:

endmqm QMB
On IBM MQ for Windows and IBM MQ for Linux (x86 and x86-64 platforms) systems, you can stop a queue manager as follows:
  1. Open the IBM MQ Explorer.
  2. Select the queue manager from the Navigator View.
  3. Click Stop... . The End Queue Manager panel is displayed.
  4. Select Controlled, or Immediate.
  5. Click OK . The queue manager stops.

Quiesced shutdown

By default, the endmqm command performs a quiesced shutdown of the specified queue manager. This might take a while to complete. A quiesced shutdown waits until all connected applications have disconnected.

Use this type of shutdown to notify applications to stop. If you issue:

endmqm -c QMB

you are not told when all applications have stopped. (An endmqm -c QMB command is equivalent to an endmqm QMB command.)

However, if you issue:

endmqm -w QMB

the command waits until all applications have stopped and the queue manager has ended.

Immediate shutdown

For an immediate shutdown any current MQI calls are allowed to complete, but any new calls fail. This type of shutdown does not wait for applications to disconnect from the queue manager.

For an immediate shutdown, type:

endmqm -i QMB

Preemptive shutdown

Note: Do not use this method unless all other attempts to stop the queue manager using the endmqm command have failed. This method can have unpredictable consequences for connected applications.
If an immediate shutdown does not work, you must resort to a preemptive shutdown, specifying the -p flag. For example:

endmqm -p QMB

This stops the queue manager immediately. If this method still does not work, see Stopping a queue manager manually for an alternative solution.

For a detailed description of the endmqm command and its options, see endmqm.

If you have problems shutting down a queue manager

Problems in shutting down a queue manager are often caused by applications. For example, when applications:
  • Do not check MQI return codes properly
  • Do not request notification of a quiesce
  • Terminate without disconnecting from the queue manager (by issuing an MQDISC call)

If a problem occurs when you stop the queue manager, you can break out of the endmqm command using Ctrl-C. You can then issue another endmqm command, but this time with a flag that specifies the type of shutdown that you require.