Monitoring transmission queue switching
It is important that you monitor the process of cluster-sender channels switching transmission queues so that the impact on your enterprise is minimized. For example, you should not attempt this process when the workload is high or by switching many channels simultaneously.
The process of switching channels
The process used to switch channels is:
- The channel opens the new transmission queue for input and starts getting messages from it (using get by correlation ID)
- A background process is initiated by the queue manager to move any messages queued for the channel from its old transmission queue to its new transmission queue. While messages are being moved any new messages for the channel are queued to the old transmission queue to preserve sequencing. This process might take a while to complete if there are a large number of messages for the channel on its old transmission queue, or new messages are rapidly arriving.
- When no committed or uncommitted messages remain queued for the channel on its old transmission queue then the switch is completed. New messages are now put directly to the new transmission queue.
To avoid the eventuality of numerous channels switching simultaneously IBM® MQ provides the ability to switch the transmission queue of
one or more channels that are not running. On:
- IBM MQ for Multiplatforms the command is called runswchl
- IBM MQ for z/OS® the CSQUTIL utility can be used to process a SWITCH CHANNEL command instead
Monitoring the status of switch operations
To understand the status of switch operations administrators can perform the following actions:
- Monitor the queue manager error log (AMQERR01.LOG) where messages are output to indicate the
following stages during the operation:
- The switch operation has started
- The moving of messages has started
- Periodic updates on how many messages are left to move (if the switch operation does not complete quickly)
- The moving of messages has completed
- The switch operation has completed
- Use the DISPLAY CLUSQMGR command to query the transmission queue that each cluster-sender channel is currently using.
- Run the runswchl command (or CSQUTIL on z/OS) in query mode to ascertain the switching status of one
or more channels. The output of this command identifies the following for each channel:
- Whether the channel has a switch operation pending
- Which transmission queue the channel is switching from and to
- How many messages remain on the old transmission queue
Potential issues that might occur
See Potential issues when switching transmission queues for a list of some issues that might be encountered when switching transmission queue, their causes, and most likely solutions.