An in-doubt channel is a channel that is in doubt with a remote channel about which messages have been sent and received.
Note the distinction between this and a queue manager being in doubt about which messages should be committed to a queue.
You can reduce the opportunity for a channel to be placed in doubt by using the Batch Heartbeat channel parameter (BATCHHB). When a value for this parameter is specified, a sender channel checks that the remote channel is still active before taking any further action. If no response is received the receiver channel is considered to be no longer active. The messages can be rolled-back, and re-routed, and the sender-channel is not put in doubt. This reduces the time when the channel could be placed in doubt to the period between the sender channel verifying that the receiver channel is still active, and verifying that the receiver channel has received the sent messages. See Channel attributes for more information about the batch heartbeat parameter.
In-doubt channel problems are typically resolved automatically. Even when communication is lost, and a channel is placed in doubt with a message batch at the sender with receipt status unknown, the situation is resolved when communication is re-established. Sequence number and LUWID records are kept for this purpose. The channel is in doubt until LUWID information has been exchanged, and only one batch of messages can be in doubt for the channel.
You can, when necessary, resynchronize the channel manually. The term manual includes use of operators or programs that contain WebSphere® MQ system management commands. The manual resynchronization process works as follows. This description uses MQSC commands, but you can also use the PCF equivalents.
- Use the DISPLAY CHSTATUS command to find the last-committed logical unit of work ID (LUWID) for eachside of the channel. Do this using the following commands:
- For the in-doubt side of the channel:
DISPLAY CHSTATUS(name) SAVED CURLUWID
You can use the CONNAME and XMITQ parameters to further identify the channel. - For the receiving side of the channel:
DISPLAY CHSTATUS(name) SAVED LSTLUWID
You can use the CONNAME parameter to further identify the channel.
The commands are different because only the sending side of the channel can be in doubt. The receiving side is never in doubt.On WebSphere MQ for IBM® i, the DISPLAY CHSTATUS command can be executed from a file using the STRMQMMQSC command or the Work with MQM Channel Status CL command, WRKMQMCHST - For the in-doubt side of the channel:
- If the two LUWIDs are the same, the receiving side has committed the unit of work that the sender considers to be in doubt. The sending side can now remove the in-doubt messages from the transmission queue and re-enable it. This is done with the following channel RESOLVE command:
RESOLVE CHANNEL(name) ACTION(COMMIT)
- If the two LUWIDs are different, the receiving side has not committed the unit of work that the sender considers to be in doubt. The sending side needs to retain the in-doubt messages on the transmission queue and re-send them. This is done with the following channel RESOLVE command:
RESOLVE CHANNEL(name) ACTION(BACKOUT)
Once this process is complete the channel is no longer in doubt. The transmission queue can now be used by another channel, if required.
Comments