Queue Path Names

The path name of a queue provides the information Message Queuing needs to create the queue. The path name of the queue specifies the name of the computer where the messages in the queue will be stored, an optional PRIVATE$ keyword that indicates whether the queue is a private queue, and the name of the queue. The application must provide a unique path name when the queue is created.

Path Name Syntax

The following examples show the syntax of path names used to create public and private queues. Note that the third example substitutes a period for the name of the computer. This is a shortcut to indicate that the messages of the queue will be stored on the local computer. (For dependent clients, the local computer is the client's supporting server.)

ComputerName\QueueName
ComputerName\PRIVATE$\QueueName
.\QueueName

Queue names have the following characteristics:

  • The name of the queue is case insensitive. For example, "MyQueue" and "myQueue" are treated as the same name.

  • Queue names longer than 124 Unicode characters are not supported. Using names longer than 64 Unicode characters for public queue names may cause a slight reduction in performance. Furthermore, they are not easily displayed in the directory service.

  • Valid characters for queue names vary slightly depending on what version of Message Queuing is creating the queue. The following table lists the characters that cannot be used.

    Message Queuing version Invalid queue name characters

    MSMQ 1.0

    \ (backslash)

    ; (semicolon)

    CR (ASCII 13); private queues only

    LF (ASCII 10); private queues only

    MSMQ 2.0 and later

    \ (backslash)

    ; (semicolon)

    CR (ASCII 13)

    LF (ASCII 10)

    + (plus)

    , (comma)

    " (double quotation mark)

NetBIOS and DNS Path Names

As of version 2.0, Message Queuing supports both NetBIOS and DNS path names for creating queues. The maximum length allowed for the full DNS name of a computer in a path name is 256 Unicode characters.

Specifying the Computer where Messages Are Stored

Messages are always stored on the local computer. However, the properties for public queues are stored in Message Queue Information Service/Active Directory Domain Services (AD DS), so they are accessible from any computer in your enterprise, which allows you to create public queues remotely. However, the properties for private queues are stored on the local computer, so only the local computer can be specified in the path name when creating a private queue.

For information on See

Referencing a queue by its format name

Format Names

Referencing a queue by its queue handle

Queue Handle

Properties used to specify the path name of a queue

PROPID_Q_PATHNAME

-or-

MSMQQueueInfo.PathName

DNS queue and computer path name properties

PROPID_Q_PATHNAME_DNS PROPID_QM_PATHNAME_DNS

-or-

MSMQQueueInfo.PathNameDNS

Example code for creating queues

Creating Queue Examples

Show:
© 2014 Microsoft