Via connections allow messages to be routed via an intermediate queue manager. For example, you might want messages from LocalQM to travel to TargetQM via RemoteQM. You can already do this with 'pushing' store and forward queues, but via connections provide another mechanism, as shown in the following diagram:
The diagram above illustrates the components being used. The connection definition called 'TargetQM' on LocalQM does not contain the address of TargetQM, but simply refers to the connection definition called 'RemoteQM'. This means that any messages destined for TargetQM will be sent to RemoteQM, and RemoteQM will be able to move the messages onward. In the diagram above, RemoteQM has the necessary connection to move the message to TargetQM.
The message flows as expected, as shown in the following diagram:
The Remote Queue on LocalQM uses Connection Resolution to find the Via Connection. This then passes the message on to the real connection which moves the message to RemoteQM. On RemoteQM queue resolution proceeds as for the simple case.
You can see the topology most clearly using Message Routes, as shown in the following diagram:
This is known as 'chaining remote queues'. The central remote queue can be synchronous, asynchronous, or even a store and forward queue.