I'm using WCF with MSMQ endpoints and am seeing the behaviour described in this question - basically although the service is throttled to process one message at a time, 2 messages are taken from the queue, with one seemingly held in memory while the other is being processed.
This presents a problem for monitoring what is happening; I have a monitoring page which shows which jobs are in the queue and which are being processed but due to this behaviour there is a period where a job effectively disappears when it is taken off the queue but hasn't started being processed yet. I'm using MessageQueue.GetAllMessages()
to fetch the list of messages currently on the queue.
I'm not that familiar with MSMQ but I assume that when a message is Dequeued it is marked as invisible so that other processes won't take it off. Is there a way to query these messages so I can see what they are?