Peeking at Messages in the Queue
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
Messages can be read from the queue without removing them from the queue. For example, if you are trying to locate a particular message, you may want to peek at the label or identifier of each message in the queue until you find the message you want, and then retrieve the complete message.
Message Queuing provides a way to always peek at the first message in a queue, or to peek at a message at a specific cursor location. This second functionality is used when you use a cursor to navigate through a queue.
More Information
For information on | See |
---|---|
Synchronous operations | Synchronous Reading |
Asynchronous operations | Asynchronous Reading |
Removing a message when it is read | Retrieving Messages |
Reading past the first message in the queue | Navigating with Cursors |
How transactions work and the different types of transactions | Transactions |
Reading the first message in the queue synchronously | C/C++ Code Example: Reading Messages Synchronously C/C++ COM Code Example: Reading Messages Synchronously Visual Basic Code Example: Reading Messages Synchronously |
Reading messages asynchronously | C/C++ Code Example: Reading Messages Asynchronously Using a Callback Function C/C++ Code Example: Reading Messages Asynchronously Using Completion Ports C/C++ COM Code Example: Reading Messages Asynchronously Visual Basic Code Example: Reading Messages Asynchronously |