3.1.7.1.26 Get Queue Path

The Get Queue Path event resolves a queue format name to the corresponding queue path name ([MS-MQMQ] section 2.1.1) and the name or address of the machine to which the queue belongs. It MUST be generated with the following argument:

  • iFormatName: A queue format name as specified in [MS-MQMQ] section 2.1.

Return Values:

  • rPathName: A string representing the queue path name or an empty string if the path name cannot be provided.

  • rMachineName: A string representing the name or address of the computer that hosts the queue manager.

  • rStatus: A status code that indicates success or failure.

    • MQ_OK (0x00000000)

    • MQ_ERROR_ILLEGAL_FORMATNAME (0xC00E001E)

The server MUST perform the following actions to process this event:

  • Set rPathName and rMachineName to empty.

  • If a direct format name ([MS-MQMQ] section 2.1.2) is specified:

    • Extract the ProtocolAddressSpecification and Protocol substrings from iFormatName.

    • If Protocol is HTTP or HTTPS:

      • Extract the Host from ProtocolAddressSpecification and set rMachineName to the Host.

    • Else:

      • Set rMachineName to ProtocolAddressSpecification.

      • Set rPathName to rMachineName and append the right substring of iFormatName after ProtocolAddressSpecification to rPathName.

  • If a public format name ([MS-MQMQ] section 2.1.3) is specified:

    • Let PublicQueueGuid be a GUID that is initialized to the QueueGuid element of iFormatName.

    • Generate a Read Directory (section 3.1.7.1.20) event with the following arguments:

      • iDirectoryObjectType := "Queue"

      • iFilter := An array of the following attribute-filter expressions:

        • "Identifier" EQUALS PublicQueueGuid

    • If rStatus returned by the Read Directory event is not equal to DirectoryOperationResult.Success:

      • Set rStatus to MQ_ERROR_ILLEGAL_FORMATNAME (0xC00E001E) and take no further action.

    • Else:

      • Define iQueue as a reference to a Queue (section 3.1.1.2) ADM element instance and set it to the returned rDirectoryObject.

      • Set rPathName to iQueue.PathName and rMachineName to iQueue.QueueManager.ComputerName.

  • If a private format name ([MS-MQMQ] section 2.1.4) is specified:

    • Let PrivateQueueQMGuid be a GUID that is initialized to the ComputerGuid element of iFormatName.

    • Generate a Read Directory event with the following arguments:

      • iDirectoryObjectType := "QueueManager"

      • iFilter := An array of the following attribute-filter expressions:

        • "Identifier" EQUALS PrivateQueueQMGuid

    • If rStatus returned by the Read Directory event is not equal to DirectoryOperationResult.Success:

      • Set rStatus to MQ_ERROR_ILLEGAL_FORMATNAME (0xC00E001E) and take no further action.

    • Else:

      • Define iQueueManager as a reference to a QueueManager (section 3.1.1.1) ADM element instance and set it to the returned rDirectoryObject.

      • Set rMachineName to iQueueManager.ComputerName.

      • If iQueueManager.Identifier EQUALS the QueueGuid component in iFormatName and there exists a Queue ADM element instance in LocalQueueManager.QueueCollection with a QueueType ADM attribute value of Private and a PrivateQueueNumber ADM attribute that EQUALS the QueueNumber component in iFormatName:

        • Set rPathName to the Pathname ADM attribute of the matching Queue ADM element instance.

  • Set rStatus to MQ_OK (0x00000000).