endmqm (end queue manager)

Stop a queue manager.

Purpose

You can use the endmqm command to stop a queue manager. This command stops a queue manager in one of three modes:
  • Controlled or quiesced shutdown
  • Immediate shutdown
  • Preemptive shutdown

Syntax

Read syntax diagramSkip visual syntax diagram endmqm  -c  -w  -i  -p  -r QMgrName

Parameters

QMgrName
Specifies the name of the message queue manager that you want to stop.
This parameter is required.
-c
Specifies that the queue manager ends in a controlled (or quiesced) shutdown.
In a controlled shutdown, the queue manager stops after all applications are disconnected. Any MQI calls currently being processed are completed. Control is returned to you immediately and you are not notified of when the queue manager is stopped.
This parameter is the default.
-i
Specifies that the queue manager ends in an immediate shutdown.
In an immediate shutdown, the queue manager stops after it all the MQI calls currently being processed are completed. Any MQI requests made after the command starts fail. Any incomplete units of work are rolled back when the queue manager is next started. Control is returned after the queue manager ends.
-p
Specifies that the queue manager ends in a preemptive shutdown.
In a preemptive shutdown, the queue manager might stop without waiting for applications to disconnect or for MQI calls to complete. This behavior can give unpredictable results for your applications. Therefore, use this type of shutdown only after other endmqm commands fail to stop the queue manager.
-r
Specifies that client connectivity can be re-established with other queue managers in their queue manager group.
The client might not reconnect to the same queue manager. Depending on the MQCONNX reconnect option the client uses, and the definition of the queue manager group in the client connection table, the client might reconnect to a different queue manager. You can configure the client to force it to reconnect to the same queue manager.
-w
Specifies that the queue manager ends in a wait shutdown.
In a wait shutdown, the queue manager stops after all applications are disconnected. Any MQI calls currently being processed are completed. Control is returned to you after the queue manager stops.

Usage notes

  • This command must be run from the IBM® MQ administration mode. If the system is in the IBM MQ administration mode the prompt includes mqa(mqcli)#. To enter the IBM MQ administration mode, enter mqcli on the command line. To exit the IBM MQ administration mode, enter exit on the command line.
  • This command does not affect the attributes of the queue manager.
  • The endmqm command affects any client application that is connected to the queue manager by a server-connection channel. The effect is equivalent to a STOP CHANNEL command in one of the following modes:
    • If the -c, or -w parameters are used, the mode is QUIESCE.
    • If the -i parameter is used, the mode is FORCE.
    • If the -p parameter is used, the mode is TERMINATE.
  • If an dspmq command is entered in the time between the applications disconnecting and the queue manager stopping, the dspmq command might report the status as Ending immediately, even if a controlled shutdown was requested.
  • For more information about this command in IBM MQ, see endmqm in the IBM MQ documentation.

Examples

  • The following command ends the queue manager that is named QM1 in a controlled way:
    
    endmqm QM1
    
  • The following command ends the queue manager that is named QM2 immediately:
    
    endmqm -i QM2
    

Related commands