queue managers, WTOR, WebSphere MQ-related, MODE(RESTART), STOP QMGR command, QUIESCE, stop mode, stopping WebSphere MQ, threads, MODE(QUIESCE), DISPLAY CONN, WebSphere MQ commands, STOP QMGR, commands, MODE(FORCE), canceling for WebSphere MQ, address space, canceling WebSphere MQ address space" /> Stopping a queue manager

 

Stopping a queue manager

Before stopping a queue manager, all WebSphere MQ-related write-to-operator-with-reply (WTOR) messages must receive replies, for example, getting log requests. Each command in Figure 5 terminates a running queue manager.

Figure 5. Stopping a queue manager

+CSQ1 STOP QMGR
 
+CSQ1 STOP QMGR MODE(QUIESCE)
 
+CSQ1 STOP QMGR MODE(FORCE)
 
+CSQ1 STOP QMGR MODE(RESTART)

The command STOP QMGR defaults to STOP QMGR MODE(QUIESCE).

In QUIESCE mode, WebSphere MQ does not allow any new connection threads to be created, but allows existing threads to continue; it terminates only when all threads have ended. Applications can request to be notified in the event of the queue manager quiescing. Therefore, use the QUIESCE mode where possible so that applications that have requested notification have the opportunity to disconnect. See the WebSphere MQ Application Programming Guide for details.

If the queue manager does not terminate in a reasonable time in response to a STOP QMGR MODE(QUIESCE) command, use the DISPLAY CONN command to determine whether any connection threads exist, and take the necessary steps to terminate the associated applications. If there are no threads, issue a STOP QMGR MODE(FORCE) command.

The STOP QMGR MODE(QUIESCE) and STOP QMGR MODE(FORCE) commands deregister WebSphere MQ from the MVS Automatic Restart Manager (ARM), preventing ARM from restarting the queue manager automatically. The STOP QMGR MODE(RESTART) command works in the same way as the STOP QMGR MODE(FORCE) command, except that it does not deregister WebSphere MQ from ARM. This means that the queue manager is eligible for immediate automatic restart.

If the WebSphere MQ subsystem is not registered with ARM, the STOP QMGR MODE(RESTART) command is rejected and the following message is sent to the z/OS console:

CSQY205I  ARM element arm-element is not registered

If this message is not issued, the queue manager is restarted automatically. For more information about ARM, see Using the z/OS Automatic Restart Manager (ARM).

Only cancel the queue manager address space if STOP QMGR MODE(FORCE) does not terminate the queue manager.

If a queue manager is stopped by either canceling the address space or by using the command STOP QMGR MODE(FORCE), consistency is maintained with connected CICS or IMS systems. Resynchronization of resources is started when a queue manager restarts and is completed when the connection to the CICS or IMS system is established.

Note:
When you stop your queue manager, you might find message IEF352I is issued. z/OS issues this message if it detects that failing to mark the address space as unusable would lead to an integrity exposure. We can ignore this message.