Long running WCF MSMQ Processing

887 Views Asked by At

I am reading Programming WCF Services 3rd Ed. by Juval Lowy. In the chapter "Queued Services" which covers NetMsmqBinding, On page 473, he says "... you should keep the service's processing of the queued call relatively short, or risk aborting the playback transaction. An important observation here is that it is wrong to equate queued calls with lengthy asynchronous calls."

1) What is a short call? 2) What is the best practice for long running operations; send send them off to the ThreadPool?

This article ran into the same problem in practice: WCF & MSMQ & TransactionScope long process

I have looked and looked, and I cannot find any best practices regarding this matter on the internet.

3) Does this rule apply if I have no transaction?

1

There are 1 best solutions below

5
On

1) By default a short process with a transaction is something that takes less than 10 minutes (default transaction timeout) 2) Can be, but if you do that you will lose the transactional behavior (if the server goes down the message will be lost) 3) Yes. By default the transaction scope has a default timeout that will abort your transaction.

The good news is that you can override that timeout on machine.config file: http://blogs.inkeysolutions.com/2012/01/managing-timeouts-while-using.html