简体   繁体   English

如何使用C#从消息队列中删除消息?

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

I am trying to develop MSMQ application for receiving the message from client applications. 我正在尝试开发MSMQ应用程序,以从客户端应用程序接收消息。 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? 我没有看到MessageQueue类可用的任何方法,有人可以帮我吗?

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. 如果使用窥视查看消息,则应停止并开始使用Receive方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM