What happens during termination in IBM MQ for z/OS
A queue manager terminates normally in response to the STOP QMGR command. If a queue manager stops for any other reason, the termination is abnormal.
Note, that during queue manager termination, IBM MQ internally issues the commandDISPLAY CONN(*) TYPE(CONN) ALL WHERE (APPLTYPE NE SYSTEMAL)so that we are aware of what threads might prevent the queue manager from completing shutdown.
SYSTEMAL matches APPLTYPES of either SYSTEM or CHINIT, so the DISPLAY CONN command filtering application types not matching SYSTEMAL, returns to the joblog information about threads that could be preventing normal shutdown.
- Normal termination
-
In a normal termination, IBM MQ stops all activity in
an orderly way. We can stop IBM MQ using either
quiesce, force, or restart mode. The effects are given in Table 1.
Thread type QUIESCE FORCE RESTART Active threads Run to completion Back out Back out New threads Can start Not permitted Not permitted New connections Not permitted Not permitted Not permitted Batch applications are notified if a termination occurs while the application is still connected.
With CICS, a current thread runs only to the end of the unit of recovery. With CICS, stopping a queue manager in quiesce mode stops the CICS adapter, and so if an active task contains more than one unit of recovery, the task does not necessarily run to completion.
If you stop a queue manager in force or restart mode, no new threads are allocated, and work on connected threads is rolled back. Using these modes can create in-doubt units of recovery for threads that are between commit processing phases. They are resolved when IBM MQ is reconnected with the controlling CICS, IMS, or RRS subsystem.
When you stop a queue manager, in any mode, the steps are:- Connections are ended.
- IBM MQ ceases to accept commands.
- IBM MQ ensures that any outstanding updates to the page sets are completed.
- The DISPLAY USAGE command is issued internally by IBM MQ so that the restart RBA is recorded on the z/OS console log.
- The shutdown checkpoint is taken and the BSDS is updated.
Terminations that specify quiesce mode do not affect in-doubt units of recovery. Any unit that is in doubt remains in doubt.
- Abnormal termination
-
An abnormal termination can leave data in an inconsistent state, for example:
- A unit of recovery has been interrupted before reaching a point of consistency.
- Committed data has not been written to page sets.
- Uncommitted data has been written to page sets.
- An application program has been interrupted between phase 1 and phase 2 of the commit process, leaving the unit of recovery in doubt.
IBM MQ resolves any data inconsistencies arising from abnormal termination during restart and recovery.
Parent topic: Recovery and restart on z/OS