queue name resolution
Queue name resolution occurs at every queue manager each time a queue is opened. Its purpose is to
identify the target queue, the target queue manager , and the route to that queue manager . The resolved
name has three parts: the queue manager name, the queue name, and, if the queue manager is remote,
the transmission queue.
- When a remote queue definition exists, the queue name supplied by the application is resolved to the
name of the destination queue, the remote queue manager, and the transmission queue specified in the
remote queue definition.
- If there is no remote queue definition and a queue manager name is specified, the queue manager looks
to see if there is a queue manager alias definition that matches the supplied queue manager name. If
there is, the information in it is used to resolve the queue manager name to the name of the destination
queue manager. The queue manager alias definition can also be used to determine the transmission
queue to the destination queue manager.
=>If the resolved queue name is not a local queue, both the queue manager name and the queue name
are included in the transmission header of each message put by the application to the transmission
queue.
Some more info (contributed by Sandhya from Orkut group)
[Link] - If the remote queue manager name is the same as the transmission queue
name, this attribute can be left blank. It is also left blank when defining an
alias for the local queue manager.
If you do not specify a transmission queue name, the transmission queue with the same name as the
remote queue manager is used.
In QM1,define xmitq with remote qmgrname "QM2"
define qremote('QR') rname('Q2') rqmname('QM2') xmitq('')
amqsput QR QM1
amqsget Q2 QM2
The queue manager identifies the xmit queue in this order:
1) the xmit queue is explicitly named in the QR definition or
2) implicitly, by using the RQMName from the QR definition or
3) a qmgr-alias that resolves the RQMName to an xmit queue or
4) a default xmit queue (think of the Tribbles episode of the old Star Trek series);
Else,MQOPEN will fail
[Link] - This must be blank when using gateway as a qmgr in cluster
This method of aliasing can be used to join a cluster to a non-cluster system. For example, for queue
manager(CLUS1) in the cluster "CLUSTER1" to communicate with the queue manager called CLUS2,
which is outside the cluster, one of the queue managers in the cluster "CLUSTER1" must act as a
gateway.
From gateway qmgr GATE issue the command:
DEFINE QREMOTE(CLUS2) RNAME(' ') RQMNAME(CLUS2) XMITQ(TQ1) CLUSTER(CLUSTER)
When a message is put into local queue of CLUS1 it is put into gateway qmgr [Link] GATE and
CLUS1 are in same [Link] GATE the message is moved to CLUS2 due to the above mentioned
definition.
while defining remote queue using mqsc command,
1. Remote queue definition
qmgr name and queue name is required,[Link] is optional
2. Queue manager alias
qmgr name is required,queue name can be left blank and Txqueue is optional
3. Reply-to queue alias
qmgr name is optional,queue name is optional and Txqueue can be left blank.