游标和MessageQueue类 [英] cursors and MessageQueue class
本文介绍了游标和MessageQueue类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使游标类与异步窥探消息一起使用.该应用程序将服务器客户端的消息放入队列中.
标签会告诉我该消息是针对哪个客户端的.我需要能够异步查看队列中的消息以确定它是否适合我.如果没有,我需要转到下一条消息. MSMQ类用于提供实现此目的的peeknext.
How do I get the cursor class to work with asynchronous peek of messages. The application puts messages for serveral clients in a queue.
The label tells me which client the message is for. I need to be able to asynchronously peek a message in the queue to determine if it is for me. If not I need to move onto the next message. The MSMQ class used to provide a peeknext to accomplish this.
推荐答案
在下面的链接中查找监视消息而不将其从队列中删除".有一个使用GetAllMessages来执行您所要求的示例.
http://msdn.microsoft.com/en-us/library/ms973860.aspx#interactmessaque_topic2 [^ ]
祝你好运!
Look for "Peek at messages without removing them from the queue" on the following link. There''s an example using GetAllMessages to do just what you asked.
http://msdn.microsoft.com/en-us/library/ms973860.aspx#interactmessaque_topic2[^]
Good luck!
这篇关于游标和MessageQueue类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文