Restricting the number of channels used
Follow these instructions to restrict the number of active channels each server runs when a price check application is installed on various queue managers.
Before starting
Note: For changes to a cluster to be propagated throughout the cluster, at least one full repository must always be available. Ensure that your repositories are available before starting this task. Scenario:
- A price check application is to be installed on various queue managers. To keep the number of channels being used to a low number, the number of active channels each server runs is restricted. The application is driven by the arrival of messages on the PRICEQ queue.
- Four server queue managers host the price check application. Two query queue managers send messages to the PRICEQ to query a price. Two more queue managers are configured as full repositories.
About this task
Follow these steps to restrict the number of channels used.
Procedure
- Choose two full repositories.
Choose two queue managers to be the full repositories for the price check cluster. They are called REPOS1 and REPOS2.
Issue the following command:
ALTER QMGR REPOS(PRICECHECK)
- Define a CLUSRCVR channel on each queue manager.
At each queue manager in the cluster, define a cluster-receiver channel and a cluster-sender channel. It does not matter which is defined first.
DEFINE CHANNEL(PRICECHECK.SERVE1) CHLTYPE(CLUSRCVR) TRPTYPE(TCP) CONNAME(SERVER1.COM) CLUSTER(PRICECHECK) DESCR('Cluster-receiver channel')
- Define a CLUSSDR channel on each queue manager.
Make a CLUSSDR definition at each queue manager to link that queue manager to one or other of the full repository queue managers.
DEFINE CHANNEL(PRICECHECK.REPOS1) CHLTYPE(CLUSSDR) TRPTYPE(TCP) CONNAME(REPOS1.COM) CLUSTER(PRICECHECK) DESCR('Cluster-sender channel to repository queue manager')
- Install the price check application.
- Define the PRICEQ queue on all the server queue managers.
Issue the following command on each:
DEFINE QLOCAL(PRICEQ) CLUSTER(PRICECHECK)
- Restrict the number of channels used by queries
On the query queue managers we restrict the number of active channels used, by issuing the following commands on each:
ALTER QMGR CLWLMRUC(2)
- If we have not already done so, start the channel initiator on IBM MQ for z/OS . On all platforms, start a listener program.
The listener program listens for incoming network requests and starts the cluster-receiver channel when it is needed.
Results
Figure 1 shows the cluster set up by this task.
Although there are four instances of the PRICEQ queue available in the PRICECHECK cluster, each querying queue manager only uses two of two of them. For example, the QUERY1 queue manager only has active channels to the SERVER1 and SERVER2 queue managers. If SERVER1 became unavailable, the QUERY1 queue manager would then begin to use another queue manager, for example SERVER3.
Parent topic: Use clusters for workload management
Related concepts
Related tasks
- Adding a queue manager that hosts a queue locally
- Use two networks in a cluster
- Use a primary and a secondary network in a cluster
- Adding a queue to act as a backup
- Adding a more powerful queue manager that hosts a queue