如何在EventAggregator中支持持久化?
我在 Prism 中使用 EventAggregator,我希望事件被持久化,这意味着当客户端订阅某个事件时,聚合器会发布之前错过的事件给客户端。有办法支持吗?
我知道这听起来更像是消息队列之类的东西。但系统已经与EventAggregator紧密耦合,因此我希望这个框架可以让我有选择地保留一些事件而不需要太多修改。
I am using EventAggregator in Prism, and I want the events persisted, which means when a client subscribes a certain event, the aggregator published the previous events that missed to the client. Is there a way to support this?
I know this sounds more like a message queue or something. But the system has already heavily coupled with EventAggregator thus I want this framework can allow me to selectively persist some events without too much modification.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
以下文章讨论了“存储并转发”EventAggregator 实现,这听起来非常适合您的场景,即客户端能够赶上他们可能错过的事件:
http://www.ademiller.com/blogs/tech/2008/ 11/向棱镜事件聚合器添加存储和转发支持/
The following article discusses a "store and forward" EventAggregator implementation which sounds like an excellent match for your scenario i.e. clients being able to catch up with events they may have missed:
http://www.ademiller.com/blogs/tech/2008/11/adding-store-and-forward-support-to-the-prism-eventaggregator/