Stopping channels

In WebSphere MQ V5.3, when you issue a STOP CHANNEL command against a server-connection channel, you can choose what method to use to stop the client-connection channel.

This means that a client channel issuing an MQGET wait call can be controlled, and you can decide how and when to stop the channel.

The STOP CHANNEL command can be issued with three modes, indicating how the channel is to be stopped:

Quiesce
Stops the channel after any current message have been processed.

Force
Stops the channel immediately.

Terminate
Stops the channel immediately, and can terminate the server-connection channel's process or thread.

If mode terminate is used, for example, an attempt is made to stop the server-connection channel, first with mode quiesce, then with mode force, and if necessary with mode terminate. This is a multi-stage process. The client can receive different return codes during the different stages of termination. see Table 9 for details of the return codes. If the process or thread is terminated, the client receives a communication error.

The return codes returned to the application vary according to the MQI call issued, and the STOP CHANNEL command issued. The state of the channel after the command is issued depends on the state of the fail if quiescing parameter in the API call (MQGMO_FAIL_IF_QUIESCING, MQPMO_FAIL_IF_QUIESCING, MQOO_FAIL_IF_QUIESCING, as appropriate). The return codes are listed in the table below, together with the client channel status after the command is issued:

Table 9. Stop Channel: Stop Modes and Reason Codes issued

Stop Mode Fail if quiescing option MQI Call CompCode MQI call Reason Code Client Channel Running
QUIESCE no Value returned from the API call Yes
QUIESCE yes MQCC_FAILED MQRC_CONNECTION_QUIESCING Yes
FORCE no MQCC_FAILED MQRC_CONNECTION_BROKEN
FORCE yes MQCC_FAILED MQRC_CONNECTION_QUIESCING (2) Yes
TERMINATE no MQCC_FAILED MQRC_CONNECTION_BROKEN
TERMINATE yes MQCC_FAILED MQRC_CONNECTION_BROKEN
HEADERS="COL1 COL2 COLSPEC0 COLSPEC1 COL3" COLSPAN="5"

Notes:

  1. Only the state of the server channel is altered if FAIL_IF_QUIESCING is not specified. The Client Channel is not ended forcefully.

  2. The channel operates for a few seconds in this state. The communications session is then ended with reason code MQRC_CONNECTION_BROKEN.

 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.