0
votes
  1. WCF Service hosted as windows service
    1. Using netmsmq binding
    2. MSMQ is transactional
    3. Windows 2003 server to host
    4. MSMQ 3.0

Due to some reason exceptions are raised and so it puts the message back in the queue and tries for serval times and then goes in faulted state.

So what should be the mechanism to handle this type of scenarios?

1

1 Answers

1
votes

Looks like you're dealing with a poisoned message that your service can't deal with. You need to find a way to detect this condition and remove the message from the queue so that the system can continue processing other requests.

You don't mention which WCF and MSMQ versions you're using, as there are differences in what WCF provides out of the box for dealing with these conditions. Look here for MSMQ 3.0 and here for MSMQ 4.0.

I've written a little bit in the past about the topic of poison messages in my blog as well.