+

Search Tips | Advanced Search

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 you begin

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

You have a choice of two ways of making the changes to cluster transmission queues take effect.
  1. 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.
  2. 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


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.

Before you begin

Change the cluster transmission queue configuration. You can change the DEFCLXQ queue manager attribute, or add or modify the CLCHNAME attribute of transmission queues.

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

Use the steps in the task as a basis for working out your own plan for making cluster-transmission queue configuration changes.

Procedure

  1. Optional: Record the current channel status Make a record of the status of current and saved channels that are serving cluster transmission queues. The following commands display the status associated with system cluster transmission queues. Add your own commands to display the status associated with cluster-transmission queues that we have defined. Use a convention, such as XMITQ. ChannelName, to name cluster transmission queues that you define to make it easy to display the channel status for those transmission queues.
    DISPLAY CHSTATUS(*) WHERE(XMITQ LK 'SYSTEM.CLUSTER.TRANSMIT.*')
    DISPLAY CHSTATUS(*) SAVED WHERE(XMITQ LK 'SYSTEM.CLUSTER.TRANSMIT.*')
    
  2. Switch transmission queues.

    • Do nothing. The queue manager switches cluster-sender channels when they restart after being stopped or inactive.

      Choose this option if we have no rules or concerns about altering a queue manager configuration. Running applications are not affected by the changes.

    • Restart the queue manager. All cluster-sender channels are stopped and restarted automatically on demand.

      Choose this option to initiate all the changes immediately. Running applications are interrupted by the queue manager as it shuts down and restarts.

    • Stop individual cluster-sender channels and restart them.

      Choose this option to change a few channels immediately. Running applications experience a short delay in message transfer between your stopping and starting the message channel again. The cluster-sender channel remains running, except during the time you stopped it. During the switch process messages are delivered to the old transmission queue, transferred to the new transmission queue by the switching process, and forwarded from the new transmission queue by the cluster-sender channel.

  3. Optional: Monitor the channels as they switch Display the channel status and the transmission queue depth during the switch. The following example display the status for system cluster transmission queues.
    DISPLAY CHSTATUS(*) WHERE(XMITQ LK 'SYSTEM.CLUSTER.TRANSMIT.*')
    DISPLAY CHSTATUS(*) SAVED WHERE(XMITQ LK 'SYSTEM.CLUSTER.TRANSMIT.*')
    DISPLAY QUEUE('SYSTEM.CLUSTER.TRANSMIT.*') CURDEPTH
    
  4. Optional: Monitor the messages AMQ7341 The transmission queue for channel ChannelName switched from queue QueueName to QueueName that are written to the queue manager error log.


Switching a stopped cluster-sender channel to another cluster transmission queue

Before you begin

You might make some configuration changes, and now want to make them effective without starting the cluster-sender channels that are affected. Alternatively, you make the configuration changes you require as one of the steps in the task.

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

This task switches the transmission queues served by stopped or inactive cluster-sender channels. You might do this task because a cluster-sender channel is stopped, and you want to switch its transmission queue immediately. For example, for some reason a cluster-sender channel is not starting, or has some other configuration problem. To resolve the problem, you decide to create a cluster-sender channel, and associate the transmission queue for the old cluster-sender channel with the new cluster-sender channel you defined.

A more likely scenario is you want to control when reconfiguration of cluster transmission queues is performed. To fully control the reconfiguration, you stop the channels, change the configuration, and then switch the transmission queues.

Procedure

  1. Stop the channels that you intend to switch
    1. Stop any running or inactive channels that you intend to switch. Stopping an inactive cluster-sender channel prevents it starting while you are making configuration changes.
      STOP CHANNEL(ChannelName) MODE(QUIESCSE) STATUS(STOPPED)
      
  2. Optional: Make the configuration changes.

    For example, see Clustering: Example configuration of multiple cluster transmission queues.

  3. Switch the cluster-sender channels to the new cluster transmission queues. On Multiplatforms, issue the following command:
    runswchl -m QmgrName -c ChannelName
    
    On z/OSĀ®, use the SWITCH function of the CSQUTIL command to switch the messages or monitor what is happening. Use the following command.
    SWITCH CHANNEL(channel_name) MOVEMSGS(YES)
    
    For more information, see SWITCH function.

    The runswchl, or CSQUTIL SWITCH, command transfers any messages on the old transmission queue to the new transmission queue. When the number of messages on the old transmission queue for this channel reaches zero, the switch is completed. The command is synchronous. The command writes progress messages to the window during the switching process.

    During the transfer phase existing and new messages destined for the cluster-sender channel are transferred in order to the new transmission queue.

    Because the cluster-sender channel is stopped, the messages build up on the new transmission queue. Contrast the stopped cluster-sender channel, to step 2 in Switching active cluster-sender channels to another set of cluster-transmission queues. In that step, the cluster-sender channel is running, so messages do not necessarily build up on the new transmission queue.

  4. Optional: Monitor the channels as they switch In a different command window, display the transmission queue depth during the switch. The following example display the status for system cluster transmission queues.
    DISPLAY QUEUE('SYSTEM.CLUSTER.TRANSMIT.*') CURDEPTH
    
  5. Optional: Monitor the messages AMQ7341 The transmission queue for channel ChannelName switched from queue QueueName to QueueName that are written to the queue manager error log.
  6. Restart the cluster-sender channels that you stopped.

    The channels do not start automatically, as you stopped them, placing them into STOPPED status.

    START CHANNEL(ChannelName)