Stopping a queue manager
You can use the endmqm command to stop a queue manager. This command provides four ways to stop a queue manager: a controlled, or quiesced, shutdown, an immediate shutdown, a preemptive shutdown, and a wait shutdown. Alternatively, on Windows and Linux®, you can stop a queue manager by using the IBM® MQ Explorer.
About this task
- Controlled (quiesced) shutdown
- By default, the endmqm command performs a quiesced shutdown of the specified queue manager. A quiesced shutdown waits until all connected applications have disconnected, so might take a while to complete.
- 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.
- Preemptive shutdown
- The queue manager stops immediately. Use this type of shutdown only in exceptional circumstances, for example, when a queue manager does not stop as a result of a normal endmqm command.
- Wait shutdown
- This type of shutdown is equivalent to a controlled shutdown except that control is returned to you only after the queue manager has stopped.
The endmqm command stops all instances of a multi-instance queue manager in the same way as it stops a single instance queue manager. You can issue the endmqm on either the active instance, or one of the standby instances of a multi-instance queue manager. However, you must issue endmqm on the active instance to end the queue manager.
- Persistent messages will persist regardless of the type of shutdown used (including manually
ending IBM MQ processes), whereas non-persistent messages
cannot be guaranteed to survive any type of shutdown.
Specifying the queue property NPMCLASS(HIGH) saves non-persistent messages on a best-can-do basis. Using endmqm -t, endmqm -tp, endmqm -p, or manually ending IBM MQ processes reduces the chances of NPMCLASS(HIGH) messages surviving an IBM MQ shutdown or restart cycle compared to endmqm -w or endmqm -i
- The combined time to both end and restart the queue manager can be longer as a result of using a
more abrupt shutdown method, particularly when using the -p and
-tp options.
If the queue manager has to resort to ending IBM MQ processes to end the queue manager, then more reconciliation of queue manager state is likely to be needed when the queue manager is restarted.
For a detailed description of the endmqm command and its options, see endmqm.
- 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)
![[Windows]](ngwin.gif)
As an alternative to using the endmqm command, on
Windows and Linux, you can stop a queue manager by using the IBM MQ Explorer to carry out either a controlled or an immediate
shutdown.
If the preemptive shutdown does not work, try