Competitive Consumer Model WCF

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

It is necessary to introduce a competitive consumer model, where there are several customers who can cope with the task, but when the client asks for more work, the task should go only to one of them. It is usually executed as part of the company service bus, but cannot find the one that I am glad to start using, therefore, to get this behavior through the WCF service.

Any ideas from people?

+4
source share
2 answers

That's right. You can set ServiceThrottlingBehavior maxConcurrentCalls to 1.

+2
source

Have you seen the distributor at NServiceBus? This is pretty much what you described.

0
source

Source: https://habr.com/ru/post/1306578/


All Articles