如何监控队列的消息到达时间?
我正在寻找特定 MSMQ 队列的 FileSystemWatcher 的等效项。是否存在类似的东西或者我需要自己推出?
谢谢!
I'm looking for the equivalent of FileSystemWatcher for a specific MSMQ queue. Does something like that exist or do I need to roll my own?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这基本上不是 MQReceiveMessage 做?对于引用 C 文档,我深表歉意,但所有这些功能都应该可用于 .NET。本质上,您可以使用此函数来查看队列中的消息:
您可以使用它来阻止直到消息准备好:
显然,您也可以使用此函数异步接收消息,在这种情况下,它的操作方式与 FileSystemWatcher 非常相似。
Isn't that basically what MQReceiveMessage does? My apologies for referencing the C docs, but all of this functionality should be available to .NET. Essentially you can use this function to peek at messages in the queue:
And you can use it to block until a message is ready:
Apparently you can also use this function to receive messages asynchronously, in which case it would operate much like the FileSystemWatcher.
您可以使用 MSMQ 触发器。请参阅 MSDN 此处。
从第一段开始:
You could use MSMQ Triggers. See MSDN here.
From the first paragraph: