Queue manager alias definitions
Overview
Queue manager alias definitions apply when an application that opens a queue to put a message, specifies the queue name and the queue manager name.
Queue manager alias definitions have three uses:
- When sending messages, remapping the queue manager name
- When sending messages, altering or specifying the transmission queue
- When receiving messages, determining whether the local queue manager is the intended destination for those messages
Outbound messages - remapping the queue manager name
Queue manager alias definitions can be used to remap the queue manager name specified in an MQOPEN call. For example, an MQOPEN call specifies a queue name of THISQ and a queue manager name of YOURQM. At the local queue manager there is a queue manager alias definition like this:
DEFINE QREMOTE (YOURQM) RQMNAME(REALQM)This shows that the real queue manager to be used, when an application puts messages to queue manager YOURQM, is REALQM. If the local queue manager is REALQM, it puts the messages to the queue THISQ, which is a local queue. If the local queue manager is not called REALQM, it routes the message to a transmission queue called REALQM. The queue manager changes the transmission header to say REALQM instead of YOURQM.
All messages for 'AMSTERDAM' are captured at 'PARIS' with a queue manager alias. The queue manager alias is named 'AMSTERDAM' and contains the definition 'AMSTERDAM via transmission queue LONDON'. The definition looks like this:
DEFINE QREMOTE (AMSTERDAM) RNAME() RQMNAME(AMSTERDAM) XMITQ(LONDON)The queue manager puts the messages on transmission queue 'LONDON' but does not make any alteration to the transmission queue header because the name of the destination queue manager, 'AMSTERDAM', does not alter.
All messages arriving at 'PARIS' and showing a transmission header containing a queue name at 'LONDON' are also put on the 'LONDON' transmission queue. In this way, messages with different destinations are collected onto a common transmission queue to an appropriate adjacent system, for onward transmission to their destinations.
Inbound messages - determining the destination
A receiving MCA opens the queue referenced in the transmission header. If a queue manager alias definition exists with the same name as the queue manager referenced, then the queue manager name received in the transmission header is replaced with the RQMNAME from that definition.
This has two uses:
- Directing messages to another queue manager
- Altering the queue manager name to be the same as the local queue manager