The use of aliases described in the previous section allows the creation of parallel routes between a source and a destination. This is sometimes desirable where we wish to send messages synchronously if possible, but asynchronously if the remote end is not currently connected. We can do this with the following setup, see Figure 66.
Figure 66. Creating parallel routes between source and destination.
Here we have defined two aliases on the target queue. One alias will be used to route synchronous traffic to the target queue, one will be used to route asynchronous traffic.
On LocalQM we have defined two remote queue definitions, one pointing at each alias. We can create an asynchronous Remote Queue Definition called Async@TargetQM, and a synchronous Remote Queue Definition called Sync@TargetQM. By choosing the name of the queue that we put to (Sync@TargetQM or Async@TargetQM) we can choose the route that the message follows, even though the destination is the same. First, the resolution of the synchronous route by putting a message to Sync@TargetQM, see Figure 67.
Figure 67. Resolving the synchronous route.
And secondly the asynchronous resolution using AsyncAlias@TargetQM, see Figure 68.
Figure 68. Resolving the asynchronous route.
We could choose to view this as a pair of Push Message Routes, see Figure 69.
Figure 69. A pair of push message routes.