检测msmq里消息的数量

1 using System.Diagnostics;
2  
3 PerformanceCounter objCounter = new PerformanceCounter("MSMQ Queue", "Messages in Queue", @"mymachine\private$\MyQueue");
4  
5 int count = (int)(objCounter.NextValue());
View Code

 

posted @ 2014-07-22 09:40  bert.zeng  阅读(128)  评论(0编辑  收藏  举报