Windows Dev Center

Creating Queue Examples

To create a queue, you need to set the path name property of the queue, set any optional queue properties to define the queue's behavior (such as the label property of the queue, and then make the call to create the queue.

Queue Path Name

The path name of the queue includes the following information.

  • The computer where the messages of the queue will be stored (for private queues this is the computer where the queue is registered.

  • An optional PRIVATE$ keyword that indicates that the queue is a private queue (if this keyword is not included Message Queuing creates a public queue).

  • A user friendly name for the queue.

For a complete description of path names, see Queue Path Names.

Registering Queues

Message Queuing registers public queues in the directory service and private queues on a specific computer.

When a public queue is created, its name, property settings, security descriptor, and the name of the computer where the queue's messages will be stored are all registered in the directory service.

When a private queue is created, its name, property settings, and security descriptor are all registered on the computer specified in the queue's path name.

Creating Transactional and Nontransactional Queues

Creating transactional and nontransactional queues is very similar. The only difference is the setting of the transactional level property for the queue. However, this done differently depending on the development language being used. Examples of creating transactional and nontransactional messages are provided in the list below.

Code Examples

© 2015 Microsoft