views:

53

answers:

1

Hi,

  1. WCF Service hosted as windows service
  2. Using netmsmq binding
  3. MSMQ is transactional
  4. Windows 2003 server to host
  5. 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?

A: 

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.

tomasr