3.11 MSMQQueue Coclass Details

The MSMQQueue object represents an open queue. An open queue represents a server's granted permission to perform particular operations on a Queue, termed here as the referenced queue or refQueue.

A Message can be read from the MessagePositionList of the referenced queue in two ways:

  • Peek, a nondestructive read operation that enables the client to read the Message without removing it from the MessagePositionList of the referenced queue

  • Receive, a destructive read operation that enables the client to read the Message and remove it from the MessagePositionList of the referenced queue

The MSMQQueue object implementation allows for receive operations to be performed within the scope of a transaction. The server MUST use the client input parameters and the execution context to get the transaction for a receive operation.

Retrieving a Message from the MessagePositionList of the referenced queue can be done using one of three approaches:

  • Using a cursor, controlled through the Cursor instance variable

  • By searching for a specific Message in the MessagePositionList of the referenced Queue, using a client-provided lookup identifier

  • Sequentially from the head of the referenced queue's MessagePositionList