Share via


Retrieving Messages to Read

 

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

Retrieving a message in a queue removes it from the queue. You can retrieve a specific message from a queue, or purge a queue by retrieving all the messages in a queue.

Message Queuing provides a way to always retrieve the first message in a queue, or retrieve a message at a specific cursor location. This second functionality is used when you use a cursor to navigate through a queue. In addition, messages can be retrieved from their destination queues either synchronously or asynchronously, thus allowing the receiving application to halt processing or continue processing while it is retrieving the messages from their queues.

More Information

For information on See
Synchronous operations Synchronous Reading
Asynchronous operations Asynchronous Reading
Leaving a message when it is read Peeking at 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