Delen via


Opening Local Queues

 

Applies To: Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server Technical Preview, Windows Vista

The following illustration shows how Message Queuing opens local queues when an application specifies a non-direct format name in the call to open the queue (this includes non-direct format names referenced in distribution lists and multiple-element format names).

This process is the same no matter what access mode you choose—send, peek, or receive access.

<No Change>

When an application makes its call to open a local queue, Message Queuing takes the following actions:

  • The Message Queuing runtime contacts the local queue manager, sending a request to open the queue.

  • The local queue manager determines if the queue is a public or private queue.

  • If the queue is public and it is referenced by a public format name, the local queue manager contacts the directory service to determine the queue's location and then checks to see if the queue is local or remote. In this case, the queue is local so the queue manager contacts the directory service again to retrieve the security descriptor of the queue.

  • If the queue is private, the local queue manager looks at the queue identifier (GUID) included in the format name to see if the queue is local or remote. In this case, the queue is local so the queue manager retrieves the properties and security descriptor of the queue from the local LQS file.

  • After getting the properties and security descriptor of the queue, the queue manager checks the access rights of the queue allowed for the caller.

  • If the caller is allowed to open the queue, the queue manager creates a queue object and returns a handle for this object to the local runtime. (If the queue is being opened with send access, the queue manager checks the access rights of the queue only when it is a local queue. For remote queues, access rights are checked by the queue manager on the remote computer where the queue resides.)

  • The local MSMQ runtime then passes the handle on to the calling application.

After Message Queuing completes this process for each local queue, the application can then send, peek at, or retrieve messages based on the access mode specified in the call to open the queues.

More Information

For information on See
What is required to open a queue Opening Queues
How MSMQ opens remote queues Opening Remote Queues
How MSMQ opens queues with a direct format name Opening Queues with a Direct Format Name