如何创建 MSMQ 故障转移系统
我们公司的网站将订单放入 MSMQ,其中有一个单独的服务检索订单并将其转发到我们的公司订单处理系统。该设计依赖于始终启动并运行的单个 MSMQ 服务器。我的任务是创建一个冗余/故障转移系统来处理 MSMQ 服务器故障。这样做的最佳实践是什么?
谢谢
(.Net 3.5、Windows Server 2008)
Our company website places orders into MSMQ, where a separate service retrieves and forwards them to our corporate order processing system. The design is dependent on the single MSMQ server always being up and running. I've been tasked with creating a redundant/failover system that will handle an MSMQ server failure. What is the best practice for doing this?
Thanks
(.Net 3.5, Windows Server 2008)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从体系结构的角度来看,最简单的方法是对 MSMQ 进行集群,以便服务可以从一个节点故障转移到另一个节点。发送方和接收方都指向集群队列。如果您没有其他集群资源来共享硬件,这是一个昂贵的解决方案。
您可能会遇到这样的情况:您有多个服务器并多次发送消息,每个服务器发送一次(或者向所有服务器多播一次)。接收进程可以使用循环法来读取消息。需要一些基本的清理逻辑来处理额外的、未使用的消息。这是一个更便宜但稍微复杂的解决方案。
各种可能性;取决于预算、可接受的停机时间等。
Simplest from an architectural point of view is to cluster MSMQ so the service can failover from one node to another. Sender and receiver point both to the clustered queue. Is an expensive solution if you have no other clustered resources to share the hardware of.
You could have a scenario where you have several servers and send the messages multiple times, once per server (or multicast once to them all). The receiving process can use round robin to read the message. Needs some basic cleanup logic for the extra, unused messsages. So a cheaper solution but slightly more complicated.
Various possibilities; depends on budget, acceptable down-time, etc.