开发者

WCF competitive consumer pattern

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 ?


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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜