Persistant subscription

依然范特西╮ 提交于 2019-12-12 02:29:50

问题


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.

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?


回答1:


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.

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.

UPDATE

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:



来源:https://stackoverflow.com/questions/9307688/persistant-subscription

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!