永久订阅 [英] Persistant subscription

查看:128
本文介绍了永久订阅的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在考虑使用基于事件的方式来更改我们现有的定期同步,并试图找到某种机制,该机制已经存在,但到目前为止仍然失败,所以可能有些人会有所帮助. 我将尝试解释我认为它如何工作,如果有人知道这已经完成,请给我指点. 因此系统看起来像这样:

I'm thinking to change our existing periodical synchronizations with event based and was trying to find some mechanism, that already exists, but failed so far, so may some of you will help. I'll try to explain how I think it could work and if someone knows that this is somewhere already done, please give me pointers. So system would look like this:

现在-有趣的部分:
-我需要订阅的客户端能够接收事件,即使这些事件是在他离线时生成的,
-但是缺少某些客户端不应阻止其他客户端接收事件.

Now - the interesting part:
- I need that subscribing client would receive events even if those events were generated when he was offline,
- but absence of some client should not block event receiving for other clients.

示例为电子邮件:我可以向多个收件人发送电子邮件,并且我可以向相同的收件人发送第二封电子邮件,而无需等到每个人都阅读第一封电子邮件,并且即使收件人不在网上,每个收件人也会收到所有电子邮件.此刻,如果电子邮件服务器发生故障,也没有人会丢失电子邮件.

Example would be email: I can send email to several recipients, and I can send second email to same recipients without waiting until everyone will read first one, and each recipient will receive all emails, even if they were not online at the moment, also if email sever goes down, nobody looses emails.

问题是WCF是否开箱即用支持此功能,如果可以,这种配置看起来如何?
如果WCF不支持此功能,那么是否有任何开源项目可以处理这种情况?

Question is does WCF out of the box support this, if yes, how would look such configuration?
If WCF does not support this, are there any open source projects, that can handle such scenario?

推荐答案

WCF不支持此功能.您可以使用WCF来构建发布订阅模式,Juval Lowy在 2006中进行了讨论,也可以使用

WCF does not support this out of the box. You can build a pub-sub pattern using WCF, Juval Lowy talked about this in 2006 or you could roll your own using netMsmqBinding.

但是,在MSMQ上有一个名为 NServiceBus 的开源框架,该框架可以很快地建立起来.并运行.但是,这不使用WCF.

However there's an open source framework which sits on top of MSMQ called NServiceBus which is very fast to get up and running. This does not use WCF however.

更新

顺便说一句-上面您提供的订阅设计在我看来是脆弱的,因为您似乎正在集中整个系统的订阅管理/存储.更好的是分布式订阅管理模型:

As an aside - the subscription design you provide above is in my opinion fragile because it looks like you are centralising the subscription management/storage for the whole system. What is better is a distributed subscription management model:

这篇关于永久订阅的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆