I've got an application that writes to a private MSMQ queue. I'd like to monitor whether the application is working properly by monitoring the queue. Normally I could just look at the number of messages on the queue using the performance counters but there is a very aggressive queue reader. If my monitoring program depends on seeing a message in the queue there is a good possibility that it will never see anything because messages have already been read before my monitoring application sees them. I.e. I'm worried about the following timeline:
--+-W-R---W-R+--W-R--W-R+---WR-W--R+-W--R-W--R+---
where W is a write
R is a read
+ is monitoring the queue
given the above, while there is activity (writes and reads) on the queue, there is never any activity when things are being monitored.
Is there any way to see the number of queue items that have passed through in the past minute or hour? Or anything else that might let me monitor the queue?
Your best bet is 1 of these 2 options: