IMSMQBusAdapter::CreateQueue

Creates a queue that can send and receive messages. You use the OS protocol to create the queue.

Parameter:

[In] PathName

The name of the queue in MachineName\QueueName format.

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

Examples of the PathName Syntax

"myMachine\myPublicQueue"

"otherMachine\otherPublicQueue"

"myMachine\Private$\myPrivateQueue"

As a shortcut, you can use "." to indicate your local machine. Therefore, you could specify myPublicQueue and myPrivateQueue on your local machine as:

.\myPublicQueue

.\Private$\myPrivateQueue

Public/Private Queues

A public queue is a queue that is registered in the directory service that any Message Queuing application can locate. Public queues are persistent. You can make a backup of their registration information, which makes them suitable for long-term use.

A private queue is a queue that is registered on the local computer (not in the directory service) that other applications typically cannot locate. Private queues have the advantage of having no directory service overhead. This means that they are faster to create, there is no latency and no replication. Further, they can be created and deleted when the directory service is not working.

More information:

IMSMQBusAdapter Interface