1
votes

I'm trying to get a level of management information available in a system which is being driven by MSMQ queues. I want to know if there's an event which can be listened to, to know when a message is successfully dequeued from a queue.

Ideally the event would be consumed via a .NET application.

This would allow me to keep track of the volume of messages passing through a queue without implementing logic into the receiving service endpoint and enable common mechanisms regardless of receiver (which will be BizTalk in some cases).

1
No, just raise your own event when you dequeue a message. If this is another app then double-no, events don't work across process boundaries. - Hans Passant
@Hans Passant, BizTalk won't raise an event when it's reading from a message queue. The COM events should work cross-process (msdn.microsoft.com/en-us/library/windows/desktop/…), but I don't have the experience to know if the right event for me is available. - Paul Turner

1 Answers

1
votes

The MessageQueue.BeginReceive asynchronous method raises the ReceivedCompleted event when a message has been sucessfully received (and therefore removed from a queue).