c# - Reactive Extension .Net - 高可用性

标签 c# .net system.reactive high-availability

我们使用 Reactive Extension 在特定时间触发特定操作。

例如:特定用户操作后两分钟做某事。

语法:

var observable = Observable.Timer(new TimeSpan(0, 0, someTime)).Take(1);
var subscribe = observable.Subscribe(i =>
                    {
                        DoSomething();
                        }
                    });

但是现在如果IIS/服务器重启,这个触发器就丢失了。这需要持久化,因为我们有高可用部署和多个托管代码的应用服务器。

帮助我们找到解决这个问题的方法。

最佳答案

But now if the IIS / server is restarted, this trigger is lost. This is required to be persisted as we have high available deployment with multiple App Servers hosting the code.

可能响应式扩展不是这里的答案。

看来您应该使用消息队列或服务总线

如果您想深入了解这种方法,请检查这些技术:

另外,看看 MassTransit ,一种可以使用上述某些消息传递技术的服务总线。

关于c# - Reactive Extension .Net - 高可用性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41178004/

相关文章:

c# - 使用Rx Start, Retry, Delay, 等待同步文件删除重试

c# - 属性窗口不会显示第三级嵌套组件的事件,除非第二级嵌套组件有事件

c# - 如何在 ASP.Net MVC 5 应用程序中从浏览器获取 URL

c# - WPF 的有效拖放启用 ListView 实现?

c# - 响应门控下一条消息发送,使用 Rx

javascript - Rx debounce operator with first 和 last

c# - 如何通过 HTTPS 实现 ServiceStack.net rest 调用?

c# - Kentico UserInfoProvider.IsAuthorizedPerClass 未按预期工作

c# - TFS 搁置集和代码审查

.net - 在 xaml 中使用数据模板时如何对不同的项目设置不同的样式?