Opening remote queues

 

A remote queue is a queue that is owned by a queue manager other than the one to which the application is connected.

To open a remote queue, use the MQOPEN call as for a local queue. You can specify the name of the queue as follows:

  1. In the ObjectName field of the MQOD structure, specify the name of the remote queue as known to the local queue manager.

    Leave the ObjectQMgrName field blank in this case.

  2. In the ObjectName field of the MQOD structure, specify the name of the remote queue, as known to the remote queue manager. In the ObjectQMgrName field, specify either:

    • The name of the transmission queue that has the same name as the remote queue manager. The name and case (uppercase, lowercase or a mixture) must match exactly.

    • The name of a queue manager alias object that resolves to the destination queue manager or the transmission queue.

    This tells the queue manager the destination of the message as well as the transmission queue that it needs to be put on to get there.

  3. If DefXmitQname is supported, in the ObjectName field of the MQOD structure, specify the name of the remote queue as known by the remote queue manager.

    Set the ObjectQMgrName field to the name of the remote queue manager (it cannot be left blank in this case).

Only local names are validated when you call MQOPEN; the last check is for the existence of the transmission queue to be used.

These methods are summarized in Table 1.

 

Parent topic:

Opening and closing objects


fg12290_