Remote queue resolution involves connection definitions and network resolution. It requires a setup where there are two queue managers, one of which is the local queue manager that you use to put the message, and the other is the queue manager to which you want the message to go. The remote queue manager must have a listener, and the local queue manager must have a connection definition describing the listener, as shown in the following diagram:
The connection definition/listener pair allows MQe to establish the network communications necessary to flow the message. The connection definition contains information about communicating with a single queue manager. The connection definition is named for the queue manager to which it defines a route. So in this example the connection definition is called TargetQM, and contains the information necessary to establish connection with (QueueManager)TargetQM. This information includes the address of the machine upon which the queue manager resides (remote host in this example), the port upon which the queue manager is listening (8081 in this example), and the protocol to use when conversing with the queue manager (FastNetwork in this example).
You need a remote queue reference on LocalQM representing the destination queue TargetQueue which resides on TargetQM. There are therefore two entities called TargetQueue@TargetQM. One is the 'real' queue, that is a local queue, and one is a reference to the real queue, a remote queue reference, as shown in the following diagram:
The message resolution for a put on LocalQM to TargetQueue@TargetQM works as shown in the following diagram:
The message route is as follows:
Although the connection definition and listener are vital to the message resolution, they do not affect the routing in this example. This is shown in the following diagram:
In later examples the connection definitions play a more important role, and they are shown explicitly. For now assume the presence of the logical link formed by the listener and not show them in the diagrams. It is often much more convenient to use a simplified view of the message route. You can do this by thinking of the four elements that contribute to this message resolution as a single, composite, entity. This entity is a Message Route, as shown in the following diagram:
Here you can see the message route that indicates that all messages put to LocalQM and addressed to TargetQueue@TargetQM will be moved directly to the destination. A Message Route is valid only if all the necessary components (Connection Definition, Listener, Remote Queue Definition, and destination queue) are present and correctly configured.
The Message Route is defined as a Push Message Route because messages are pushed from the source queue to the destination queue, by LocalQM.