3.1.5.2.1 Resolve Host Address

The queue manager MUST provide a queue format name that specifies the destination queue manager and queue.

The protocol MUST find the OutgoingQueue ([MS-MQDMPR]section 3.1.1.3) ADM element instance in the local QueueManager.QueueCollection with a DestinationFormatName equal to the provided queue format name.

The protocol MUST set the OutgoingQueueReference ADM element to the found OutgoingQueue ADM element instance.

The protocol MUST declare the destinationHostName and destinationQmGuid variables.

The protocol MUST obtain the value of destinationHostName and destinationQmGuid by performing the following steps:

  • The protocol MUST raise a Get Destination Info (section 3.1.7.4) event with the following argument:

    • iFormatName: The provided queue format name

  • If the value in rStatus does not equal TRUE, the protocol MUST perform the following steps:

    • If the OutgoingMessageTable ADM element is not empty and the OutgoingQueueReference.State is not OnHold:

    • Take no further action.

  • Set destinationHostName equal to the returned rHostName.

  • Set destinationQmGuid equal to the returned rQueueManagerGuid.

If destinationQmGuid is not equal to all zero bytes, the protocol MUST obtain the host name and the GUID of the QueueManager ADM element instance at the next hop to the destination by performing the following steps:

  • The protocol MUST raise a Get Next Hops (section 3.1.7.5) event with the following argument:

    • iQmGuid: destinationQmGuid

  • If the value in rStatus does not equal TRUE, the protocol MUST perform the following steps:

    • If the OutgoingMessageTable ADM element is not empty and the OutgoingQueueReference.State is not OnHold:

      • Start the Session Retry Connect Timer (section 3.1.2.3).

      • Set the OutgoingQueueReference.State to NeedValidation.

    • Take no further action.

  • Clear the OutgoingQueueReference.NextHops collection.

  • For each QueueManager ADM element instance, referred to as rQueueManager, in the returned rQueueManager's collection, perform the following:

    • Resolve destinationHostName to addresses, referred to as destinationAddresses, which are usable by the transports specified in section 2.1.<55>

    • For each successfully resolved destinationAddress in destinationAddresses, perform the following:

      • Format the destinationAddress, as specified in [MS-MQMQ] section 2.3.12.12, and add it to the OutgoingQueueReference.NextHops collection.

      • Create a NextHop (section 3.1.1.3.1.3) ADM element instance and perform the following:

        • Set NextHop.HostName to rQueueManager.QualifiedComputerName.

        • Set NextHop.QMGuid to rQueueManager.Identifier.

        • Set NextHop.Address to destinationAddress.

        • Add the NextHop ADM element instance to the NextHopCollection ADM element.

  • Set the NextHopIndexer ADM element to the first element in the NextHopCollection ADM element.

  • Get the reference to the NextHop ADM element instance referenced by the NextHopIndexer ADM element in the NextHopCollection ADM element and perform the following:

    • Set the RemoteQMAddress ADM element to NextHop.Address.

    • Set the RemoteQMHostName ADM element to NextHop.HostName.

    • Set the RemoteQMGuid ADM element to NextHop.QMGuid.