Clustering: Switching cluster transmission queues
Plan how the changes to the cluster transmission queues of an existing production queue manager are going to be brought into effect.
Before starting
If you reduce the number of messages the switching process has to transfer to the new transmission queue, switching completes more quickly. Read How the process to switch cluster-sender channel to a different transmission queue works for the reasons for trying to empty the transmission queue before proceeding any further.
About this task
We have a choice of two ways of making the changes to cluster transmission queues take effect.
- Let the queue manager make the changes automatically. This is the default. The queue manager switches cluster-sender channels with pending transmission queue changes when a cluster-sender channel next starts.
- Make the changes manually. We can make the changes to a cluster-sender channel when it is stopped. We can switch it from one cluster transmission queue to another before the cluster-sender channel starts.
What factors do you take into account when deciding which of the two options to choose, and how do you manage the switch?
Procedure
- Option 1: Let the queue manager make the changes automatically; see Switching active cluster-sender channels to another set of cluster-transmission queues.
Choose this option if we want the queue manager to make the switch for you.
An alternative way to describe this option is to say the queue manager switches a cluster-sender channel without you forcing the channel to stop. You do have the option of forcing the channel to stop, and then starting the channel, to make the switch happen sooner. The switch starts when the channel starts, and runs while the channel is running, which is different to option 2. In option 2, the switch takes place when the channel is stopped.
- If you choose this option by letting the switch happen automatically, the switching process starts when a cluster-sender channel starts. If the channel is not stopped, it starts after it becomes inactive, if there is a message to process. If the channel is stopped, start it with the START CHANNEL command.
- The switch process completes as soon as there are no messages left for the cluster-sender channel on the transmission queue the channel was serving. As soon as that is the case, newly arrived messages for the cluster-sender channel are stored directly on the new transmission queue. Until then, messages are stored on the old transmission queue, and the switching process transfers messages from the old transmission queue to the new transmission queue. The cluster-sender channel forwards messages from the new cluster transmission queue during the whole switching process.
- When the switch process completes depends on the state of the system. If we are making the changes in a maintenance window, assess beforehand whether the switching process will complete in time. Whether it will complete in time depends on whether the number of messages that are awaiting transfer from the old transmission queue reaches zero.
The advantage of the first method is it is automatic. A disadvantage is that if the time to make the configuration changes is limited to a maintenance window, we must be confident that we can control the system to complete the switch process inside the maintenance window. If we cannot be sure, option 2 might be a better choice.
- Option 2: Make the changes manually; see Switching a stopped cluster-sender channel to another cluster transmission queue.
Choose this option if we want to control the entire switching process manually, or if we want to switch a stopped or inactive channel. It is a good choice, if we are switching a few cluster-sender channels, and we want to do the switch during a maintenance window.
An alternative description of this option is to say that you switch the cluster-sender channel, while the cluster-sender channel is stopped.
- If you choose this option you have complete control over when the switch takes place.
- We can be certain about completing the switching process in a fixed amount of time, within a maintenance window. The time the switch takes depends on how many messages have to be transferred from one transmission queue to the other. If messages keep arriving, it might take a time for the process to transfer all the messages.
- We have the option of switching the channel without transferring messages from the old transmission queue. The switch is
instant.- When you restart the cluster-sender channel, it starts processing messages on the transmission queue you newly assigned to it.
The advantage of the second method is you have control over the switching process. The disadvantage is that we must identify the cluster-sender channels to be switched, run the necessary commands, and resolve any in-doubt channels that might be preventing the cluster-sender channel stopping.
- Switching active cluster-sender channels to another set of cluster-transmission queues
This task gives you three options for switching active cluster-sender channels. One option is to let the queue manager make the switch automatically, which does not affect running applications. The other options are to stop and start channels manually, or to restart the queue manager.- Switching a stopped cluster-sender channel to another cluster transmission queue
If you choose to make changes manually, you make the changes to a cluster-sender channel when it is stopped and switch it from one cluster transmission queue to another before the cluster-sender channel starts.Parent topic: Clustering: Planning how to configure cluster transmission queues
Related concepts
Related tasks
Related information