wcfmsmqmsmq-wcf

WCF Service Not Reading Messages in Queue


I have a WCF service that reads from a message queue. I noticed with our latest deployment that there is a message sitting in the queue that has not been read. The WCF service is up and running and it is correctly establishing a connection to the queue (or I would receive and error).

We made some changes to our code recently and we are wondering if perhaps that is related. It seems odd to us that the service would be running and yet the message not read. At a minimum, I would expect WCF to throw some sort of error if there was a malformed message in the queue.

I looked at the properties of the message and it says there have been zero moves, so I don't think it is being sent to a retry sub-queue. It is just sitting there and the service won't read it.

Is there a circumstance where WCF would ignore a message in the queue? How does WCF handle malformed messages?

Sorry if this isn't a lot of information to go on. At this point I am just trying to understand what is preventing the message from being processed.


Solution

  • This situation seemed just too odd. It didn't make sense that WCF would do nothing at all.

    I eventually decided to simply try restarting the MSMQ service on the server. Once I did that, my service immediately picked up the messages and everything started working again.

    I have no idea if this had something to do with a Windows Update or some other server change. I am glad it was this easy to fix - it will be the first thing I try in the future.