I created a WCF service contract that works against MSMQ. Since it is MSMQ, I use one-way communication:
[OperationContract(IsOneWay = true)]
In my service implementation, I have OperationBehavior
to automatically commit transactions:
[OperationBehavior(TransactionAutoComplete = true, TransactionScopeRequired = true)]
This makes sure WCF handles any exceptions by putting the message on a retry queue (per my configuration). It seems odd to be throwing an exception from a one-way operation. Is this the correct way to tell WCF not to commit the transaction?