Stop a queue manager
Overview
Use the endmqm command to stop a queue manager:
endmqm saturn.queue.manager
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 saturn.queue.manageryou are not told when all applications have stopped. (An endmqm -c saturn.queue.manager command is equivalent to an endmqm saturn.queue.manager command.)
However, if you issue:
endmqm -w saturn.queue.manager...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 saturn.queue.manager
Preemptive shutdown
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, resort to a preemptive shutdown, specifying the -p flag. For example:
endmqm -p saturn.queue.managerThis stops all queue managers immediately.
If this method still does not work, see Stopping a queue manager manually for an alternative solution.
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.