tags:

views:

38

answers:

2

Is it possible to create a WCF service (web service) that only accepts a single connection at any one time with all other calls either queued or rejected.

Need to implement the competitive consumer pattern where there are a number of clients which could deal with task at hand but when a client askes for more work a task must go to only one of them. Usual done as part of an enterprise service bus but can not find one that I'm happy to start using so looking to get this behaviour through a WCF service.

Any ideas people ?

+2  A: 

Absolutely. You can set the ServiceThrottlingBehavior's maxConcurrentCalls to 1.

Josh Einstein
it's `maxConcurrentCalls` in the config file
marc_s
A: 

Have you looked at the distributor in NServiceBus? It does pretty much what you described.

Udi Dahan