+

Search Tips | Advanced Search

Comparison of clustering and distributed queuing

Compare the components that need to be defined to connect queue managers using distributed queuing and clustering.

If we do not use clusters, your queue managers are independent and communicate using distributed queuing. If one queue manager needs to send messages to another, we must define:

Figure 1 shows the components required for distributed queuing.

Figure 1. Distributed queuing
If you group queue managers in a cluster, queues on any queue manager are available to any other queue manager in the cluster. Any queue manager can send a message to any other queue manager in the same cluster without explicit definitions. You do not provide channel definitions, remote-queue definitions, or transmission queues for each destination. Every queue manager in a cluster has a single transmission queue from which it can transmit messages to any other queue manager in the cluster. Each queue manager in a cluster needs to define only:

  • One cluster-receiver channel on which to receive messages
  • One cluster-sender channel with which it introduces itself and learns about the cluster


Definitions to set up a cluster versus distributed queuing

Look at Figure 2, which shows four queue managers each with two queues. Consider how many definitions are needed to connect these queue managers using distributed queuing. Compare how many definitions are needed to set up the same network as a cluster.
Figure 2. A network of four queue managers


Definitions to set up a network using distributed queuing

To set up the network shown in Figure 1 using distributed queuing, you might have the following definitions:

Description Number per queue manager Total number
A sender-channel definition for a channel on which to send messages to every other queue manager 3 12
A receiver-channel definition for a channel on which to receive messages from every other queue manager 3 12
A transmission-queue definition for a transmission queue to every other queue manager 3 12
A local-queue definition for each local queue 2 8
A remote-queue definition for each remote queue to which this queue manager wants to put messages 6 24

We might reduce this number of definitions by using generic receiver-channel definitions. The maximum number of definitions could be as many as 17 on each queue manager, which is a total of 68 for this network.


Definitions to set up a network using clusters

To set up the network shown in Figure 1 using clusters we need the following definitions:

Description Number per queue manager Total number
A cluster-sender channel definition for a channel on which to send messages to a repository queue manager 1 4
A cluster-receiver channel definition for a channel on which to receive messages from other queue managers in the cluster 1 4
A local-queue definition for each local queue 2 8

To set up this cluster of queue managers (with two full repositories), we need four definitions on each queue manager, a total of sixteen definitions altogether. You also need to alter the queue manager definitions for two of the queue managers, to make them full repository queue managers for the cluster.

Only one CLUSSDR and one CLUSRCVR channel definition is required. When the cluster is defined, we can add or remove queue managers (other than the repository queue managers) without any disruption to the other queue managers.

Use a cluster reduces the number of definitions required to set up a network containing many queue managers.

With fewer definitions to make there is less risk of error:

  • Object names always match, for example the channel name in a sender-receiver pair.
  • The transmission queue name specified in a channel definition always matches the correct transmission queue definition or the transmission queue name specified in a remote queue definition.
  • A QREMOTE definition always points to the correct queue at the remote queue manager.

Once a cluster is set up, we can move cluster queues from one queue manager to another within the cluster without having to do any system management work on any other queue manager. There is no chance of forgetting to delete or modify channel, remote-queue, or transmission-queue definitions. We can add new queue managers to a cluster without any disruption to the existing network.

Parent topic: Designing clusters

Last updated: 2020-10-04