I have a WCF service over netMsmqBinding (MSMQ3). The service code doesn't run run under WCF transaction control because some operations in the service do not have transactional capability and are not capable of rolling back. As I understand it, this means I do not get any of the benefits of poison message handling etc. So once my service code is invoked, the message is off the queue forever.
In the case of a critical failure in my service, I want to prevent further message loss. So I log the message that has just failed and then raise a plain exception (not FaultException). As with any other WCF service binding, I expect this to fault the channel (MSMQ channel dispatcher in this case) and receive no further messages from the queue.
But I can't seem to get this behaviour (no pun) to work. Irrespective of whether my service code throws exceptions, I keep on getting the messages routed to the service.
Am I missing something here? Does netMsmqBinding behave like the http bindings in that a new channel is created for every request? If so, then any idea on how to resolve my problem would be appreciated.