WCF回调与多个客户端 [英] WCF callback with multiple clients
问题描述
我可以让两个不同的客户端监听同一个WCF回调,并让它们都接收相同的数据,而不必进行两次处理?
Can I have two different clients listening to the same WCF callback and have them both receive the same data without having to do the processing twice?
推荐答案
不是真的 - 至少不是直接。你所描述的听起来很像发布/订阅模式。 WCF服务基本上只能在任何给定时间为一个客户端和一个客户端提供服务。
Not really - at least not directly. What you're describing sounds a lot like the publish/subscribe pattern. A WCF service basically services one client and one client only, at any given time.
有些方法可以在WCF 4.0和更好的WCF 4.0 - 没有Windows Azure的.NET服务。还有其他工具和对发布/订阅模式的支持。
There are ways to do this in WCF 3.5 and better ones in WCF 4.0 - with or without Windows Azure's .NET Services. There are also other tools and support for the publish/subscribe pattern.
查看以下内容:
- WCF Implementation of the Publish/Subscribe model
- Building a Pub/Sub Message Bus with WCF and MSMQ
- NServiceBus
如果你是Google或Bing为WCF发布订阅,你会得到更多的点击 - 但这三个应该真的让你开始,我想。
If you Google or Bing for "WCF Publish Subscribe", you'll get a lot more hits - but those three should really get you started, I think.
这篇关于WCF回调与多个客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!