Search code examples
.netvb.netmsmq

Delete Single Message MSMQ


Is it possible to delete a single message from a MSMQ message queue ? I have a Queue object, a message (object) that I have got to by peeking and the ID of the message, I can see a way of deleting (or purging) the entire queue, but I can't see a way to delete the message on it's own, I've tried receiving the message once I have found it by peeking, but I get the error that "the cursor is invalid"

Any help gratefully received


Solution

  • Are you trying to use MessageQueue.ReceiveById?