简体   繁体   English

虽然缺少MSMQ消息

[英]Missing MSMQ message although it is there

I have a web app that drop service request onto the msmq via wcf. 我有一个Web应用程序,可通过wcf将服务请求放到msmq上。 The wcf service class is configure to have maximum of 1, ie only 1 instance of the class processing the request at any given time. wcf服务类被配置为最大为1,即在任何给定时间只有1个该类实例处理请求。 There instances where 3 service request is submitted but we only see 1 msmq message in the queue with 1 message being currently process by the wcf service class. 在某些情况下,提交了3个服务请求,但是在队列中我们仅看到1个msmq消息,而wcf服务类当前正在处理1个消息。 1 msmq message is perceive missing as we do not see the msmq message in the msmq monitoring snap-in. 由于我们在msmq监视管理单元中看不到msmq消息,因此认为缺少1个msmq消息。 But however all 3 service request is executed in the end. 但是,不管所有3个服务请求最终执行。 What is the cause of this and what is the best way to have a consistent and accurate monitoring. 这是什么原因,以及进行一致且准确的监视的最佳方法是什么。

The MSMQ Snap-in is pretty slow for this and you often need to execute a Refresh manually. 为此,MSMQ管理单元非常慢,您通常需要手动执行刷新。 I simply guess that the messages are processed more quickly than you can follow them with the snap-in. 我只是猜测消息的处理速度比使用管理单元跟踪消息的速度快。

My suggestion is to implement your own monitoring app. 我的建议是实施自己的监视应用程序。 John Opincar wrote a nice article with sample code about it: Counting Messages in an MSMQ MessageQueue from C# John Opincar撰写了一篇不错的文章,其中带有示例代码: 从C#的MSMQ MessageQueue中计数消息

This was the base for rolling own own Message Queue Monitor that is still used on our production systems. 这是滚动自己的Message Queue Monitor的基础,该监视器仍在我们的生产系统上使用。

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

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