服务器场中的 MSMQ
我们正在考虑在我们的应用程序中使用 MSMQ 作为消息处理服务。我们想要的是 - MSMQ 位于网络负载均衡器 (NLB) 后面的服务器场中,在节点之间分配负载。我有以下问题,但在网上找不到任何指导。
1) 我需要在所有节点上安装MSMQ吗?
2) 如果是这样,当发送方应用程序向 MSMQ 发送消息时,是否应该发送到所有节点?
3)如果我的第二个问题的答案是肯定的,那么当客户端应用程序接收到消息时,应该如何通知其他节点客户端正在接收该消息并随后从它们中删除?
将不胜感激任何帮助/指示。
We are considering using MSMQ as a message processing service in our application. What we want is - MSMQ in a farm of servers sitting behind Network Load Balancer (NLB) that distributes load among the nodes. I have the following questions for which I couldn't find any pointers online.
1) Do I need to have MSMQ installed in all nodes?
2) If so, when the sender application sends a message to MSMQ should it send to all nodes?
3) If answer to my 2nd question is yes, then when a message is received by the client application, how should the other nodes be notified about the message being received by the client and subsequently remove from them?
Would appreciate any help/pointers.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
以下是一些可能有帮助的博客文章:
Q1) 我需要在所有节点上安装MSMQ吗?
A1) 您需要在每台服务器上安装 MSMQ,以便也可以传递消息。
Q2) 如果是这样,当发送方应用程序向 MSMQ 发送消息时,是否应该发送到所有节点?
A2) 这是负载平衡的一种方法,您将 X 消息发送到 X 节点,但只从 1 个节点读取,丢弃其他副本。
另一种方法是发送到网络负载平衡器,该负载平衡器将一条消息发送到一个随机选择的节点,尽管 MSMQ 非常粘性,因此很难/不可能以这种方式对大量消息进行负载平衡。
Q3)如果我的第二个问题的答案是肯定的,那么当客户端应用程序接收到消息时,应该如何通知其他节点客户端正在接收该消息并随后从它们中删除?
A3)这是您建议的负载平衡类型的缺点。 MSMQ 不会删除消息,除非您的应用程序将其删除或者 TimeToBeReceived 计时器到期。基本上,如果需要避免重复的消息处理,则需要具有协调的客户端应用程序。
干杯
约翰·布瑞克威尔
Here are some blog posts that may help:
Q1) Do I need to have MSMQ installed in all nodes?
A1) You need MSMQ installed on every server that a message will be delivered too.
Q2) If so, when the sender application sends a message to MSMQ should it send to all nodes?
A2) That's one way to load-balance where you send X messages to X nodes but only read from 1 node, discarding the other copies.
Another method is to send to a network load balancer that sends one message to one randomly-selected node, although MSMQ is very sticky so very difficult/impossible to load balance high volumes in that way.
Q3) If answer to my 2nd question is yes, then when a message is received by the client application, how should the other nodes be notified about the message being received by the client and subsequently remove from them?
A3) That is the down-side to the type of load-balancing you're suggested. MSMQ won't remove a message unless either your application removes it or the TimeToBeReceived timer expires. basically, you will need to have co-ordinated client applications if you need to avoid duplicate message processing.
Cheers
John Breakwell