How to get to the remote queue manager
You might not always have one channel between each source and target queue manager. There are a number of other ways of linking between the two, including multi-hopping, sharing channels, using different channels and clustering.
Multi-hopping
If there is no direct communication link between the source queue manager and the target queue manager, it is possible to pass through one or more intermediate queue managers on the way to the target queue manager. This is known as a multi-hop.
You need to define channels between all the queue managers, and transmission queues on the intermediate queue managers. This is shown in Figure 1.Sharing channels
As an application designer, we have the choice of forcing our applications to specify the remote queue manager name along with the queue name, or creating a remote queue definition for each remote queue. This definition holds the remote queue manager name, the queue name, and the name of the transmission queue. Either way, all messages from all applications addressing queues at the same remote location have their messages sent through the same transmission queue. This is shown in Figure 2.Figure 2 illustrates that messages from multiple applications to multiple remote queues can use the same channel.
Use different channels
If we have messages of different types to send between two queue managers, we can define more than one channel between the two. There are times when you need alternative channels, perhaps for security purposes, or to trade off delivery speed against sheer bulk of message traffic.
To set up a second channel you need to define another channel and another transmission queue, and create a remote queue definition specifying the location and the transmission queue name. Your applications can then use either channel but the messages are still delivered to the same target queues. This is shown in Figure 3.When we use remote queue definitions to specify a transmission queue, our applications must not specify the location (that is, the destination queue manager) themselves. If they do, the queue manager does not use the remote queue definitions. Remote queue definitions give you location independence. Applications can put messages to a logical queue without knowing where the queue is located and we can alter the physical queue without having to change our applications.
Use clustering
Every queue manager within a cluster defines a cluster-receiver channel. When another queue manager wants to send a message to that queue manager, it defines the corresponding cluster-sender channel automatically. For example, if there is more than one instance of a queue in a cluster, the cluster-sender channel could be defined to any of the queue managers that host the queue. IBM MQ uses a workload management algorithm that uses a round-robin routine to select an available queue manager to route a message to. For more information see Clusters.