Search code examples
c#msmq

how to delete the message from Message queue using C#?


I am trying to develop MSMQ application for receiving the message from client applications. I am able to create create message queue and able send/receive messages. Now i want to delete the messages once it is read. I didn't see any methods available with MessageQueue Class.Can anyone help me on this?


Solution

  • Once a message has been received, it will be removed from the queue. If you're using peek to view messages, you should stop and begin to use the Receive method.