Name resolution

 

How the MQOPEN call resolves queue names.

A Queue manager alias is a remote queue definition without an RNAME field.

When you open a WebSphere MQ queue, the MQOPEN call performs a name resolution function on the queue name that you specify. This determines on which queue the queue manager performs subsequent operations. This means that when you specify the name of an alias queue or a remote queue in your object descriptor (MQOD), the call resolves the name either to a local queue or to a transmission queue. If a queue is opened for any type of input, browse, or set, it resolves to a local queue if there is one, and fails if there is not one. It resolves to a nonlocal queue only if it is opened for output only, inquire only, or output and inquire only. See Table 1 for an overview of the name resolution process. The name that you supply in ObjectQMgrName is resolved before that in ObjectName.

Table 1 also shows how we can use a local definition of a remote queue to define an alias for the name of a queue manager. This allows you to select which transmission queue is used when you put messages on a remote queue, so you could, for example, use a single transmission queue for messages destined for many remote queue managers.

To use the following table, first read down the two left-hand columns, under the heading Input to MQOD, and select the appropriate case. Then read across the corresponding row, following any instructions. Following the instructions in the Resolved names columns, we can either return to the Input to MQOD columns and insert values as directed, or you can exit the table with the results supplied. For example, you might be required to input ObjectName.

Resolving queue names when using MQOPEN
Input to MQOD Resolved names
ObjectQMgrName ObjectName ObjectQMgrName ObjectName Transmission queue
Blank or local queue manager Local queue with no CLUSTER attribute Local queue manager Input ObjectName Not applicable (local queue used)
Blank queue manager Local queue with CLUSTER attribute Workload management selected cluster queue manager or specific cluster queue manager selected on PUT Input ObjectName SYSTEM.CLUSTER. TRANSMIT.QUEUE and local queue used

SYSTEM.QSG. TRANSMIT.QUEUE (see note)

Local queue manager Local queue with CLUSTER attribute Local queue manager Input ObjectName Not applicable (local queue used)
Blank or local queue manager Model queue Local queue manager Generated name Not applicable (local queue used)
Blank or local queue manager

Alias queue

Perform name resolution again with ObjectQMgrName unchanged, and input ObjectName set to the BaseQName in the alias queue definition object. Must not resolve to an alias queue    
Blank or local queue manager

Local definition of a remote queue

Perform name resolution again with ObjectQMgrName set to RemoteQMgrName, and ObjectName set to RemoteQName. Must not resolve remote queues   Name of XmitQName attribute, if non-blank; otherwise RemoteQMgrName in the remote queue definition object.

SYSTEM.QSG. TRANSMIT.QUEUE (see note)

Blank queue manager No matching local object; cluster queue found Workload management selected cluster queue manager or specific cluster queue manager selected on PUT Input ObjectName SYSTEM.CLUSTER. TRANSMIT.QUEUE

SYSTEM.QSG. TRANSMIT.QUEUE (see note)

Blank or local queue manager No matching local object; cluster queue not found   Error, queue not found Not applicable
Name of queue manager in same queue sharing group as local queue manager Local shared queue Local queue manager Input ObjectName Not applicable
Name of a local transmission queue (Not resolved) Input ObjectQMgrName Input ObjectName Input ObjectQMgrName

SYSTEM.QSG. TRANSMIT.QUEUE (see note)

Queue manager alias definition (RemoteQMgrName may be the local queue manager) (Not resolved, remote queue) Perform name resolution again with ObjectQMgrName set to RemoteQMgrName. Must not resolve to remote queues Input ObjectName Name of XmitQName attribute, if non-blank; otherwise RemoteQMgrName in the remote queue definition object.

SYSTEM.QSG. TRANSMIT.QUEUE (see note)

Queue manager is not the name of any local object; cluster queue managers or queue manager alias found (Not resolved) ObjectQMgrName or specific cluster queue manager selected on PUT Input ObjectName SYSTEM.CLUSTER. TRANSMIT.QUEUE

SYSTEM.QSG. TRANSMIT.QUEUE (see note)

Queue manager is not the name of any local object; no cluster objects found (Not resolved) Input ObjectQMgrName Input ObjectName DefXmitQName attribute of the queue manager where DefXmitQName is supported.

SYSTEM.QSG. TRANSMIT.QUEUE (see note)

The SYSTEM.QSG.TRANSMIT.QUEUE is used if local and remote queue managers are in the same queue-sharing group; intra-group queuing is enabled.

  1. BaseQName is the name of the base queue from the definition of the alias queue.

  2. RemoteQName is the name of the remote queue from the local definition of the remote queue.

  3. RemoteQMgrName is the name of the remote queue manager from the local definition of the remote queue.

  4. XmitQName is the name of the transmission queue from the local definition of the remote queue.

  5. When using WebSphere MQ for z/OS queue managers that are part of a queue-sharing group (QSG), the name of the QSG can be used instead of the local queue manager name in Table 1.

  6. In the ObjectName column of the table, CLUSTER refers to both the CLUSTER and CLUSNL attributes of the queue.

Opening an alias queue also opens the base queue to which the alias resolves, and opening a remote queue also opens the transmission queue. Therefore you cannot delete either the queue that you specify or the queue to which it resolves while the other one is open.

The resolved queue name and the resolved queue manager name are stored in the ResolvedQName and ResolvedQMgrName fields in the MQOD.

For more information about name resolution in a distributed queuing environment see WebSphere MQ Intercommunications.

 

Parent topic:

Opening objects using the MQOPEN call


fg12170_