Msmq with multiple endpoints and concurrent processing

I built a WCF Load Balancer / Router to conditionally route any one route service to multiple endpoints using all MSMQ bindings. I also created a host that uses all of the router endpoints to accept service calls. The entire endpoint points to the same contract.

I need each queue (endpoint) to be processed at the same time, but each service call to be processed sequentially.

Ive tried using InstanceContextMode = InstanceContextMode.Single and ConcurrencyMode = ConcurrencyMode.Single, but this only gives me one instance handling all my endpoints. InstanceContextMode = PerCall does not guarantee the order I need.
I only need one instance of the service per endpoint, which will start at the same time.

Ive also tried various permutations with ServiceBehavior

ReleaseServiceInstanceOnTransactionComplete = true/false.

      

How would I do this with WCF using MSMQ bindings?

0


source to share


1 answer


Place the config to make it a little clearer. You can also control how WCF makes calls by defining your own synchronization context. I had to do this for another project and I posted the code in this article



http://www.codeproject.com/KB/threads/SynchronizationContext3.aspx

+1


source







All Articles