简体   繁体   English

Windows Service Bus添加到MSMQ有什么作用?

[英]What does Windows Service Bus add to MSMQ?

I'd like to make an informed choice towards a simple publish/subscribe architecture. 我想对简单的发布/订阅架构做出明智的选择。

So I'm wondering: what does the Service Bus add that MSMQ can't do ? 所以我想知道: 服务总线添加了什么,MSMQ不能做什么?
What are the drawbacks of the Service Bus ? 服务总线有哪些缺点

Thx for enlightening me! 感谢我的启发!

The main functional difference is Service Bus provides out of the box support for message exchange semantics such as topic based routing via publish-subscribe. 主要功能差异是Service Bus提供对消息交换语义的开箱即用支持,例如通过发布 - 订阅的基于主题的路由。

MSMQ on the other hand is a lightweight store-and-forward queuing system, which supports point-to-point one way messaging. 另一方面,MSMQ是一个轻量级的存储转发排队系统,它支持点对点单向消息传递。

Service Bus: 服务总线:

  1. depends on SQL Server, and 取决于SQL Server,和
  2. is a broker . 经纪人 This may be considered a drawback . 这可能被认为是一个缺点

If you are looking at pub-sub frameworks then a popular one at the moment (free in single threaded mode) is NServiceBus , which sits on top of MSMQ, though has swap-able transport. 如果您正在查看pub-sub框架,那么目前流行的框架(单线程模式下免费)是NServiceBus ,它位于MSMQ之上,但具有可交换的传输。

Pros 优点

  • Service Bus allows you to publish over tcp and http which is cool, and gives you greater decoupling. Service Bus允许您通过tcp和http发布,这很酷,并且可以提供更好的解耦。
  • Service Bus is a sql database so your Disaster Recovery is WAY simpler and a lot cheaper to implement. Service Bus是一个SQL数据库,因此您的灾难恢复更简单,实施起来便宜很多。

Cons 缺点

  • Service Bus is centralised, and MSMQ is federated, so potentially more scalable. Service Bus是集中式的,MSMQ是联合的,因此可扩展性更高。 Although you can scale out with more nodes in WSB. 虽然您可以在WSB中扩展更多节点。
  • You need a live connection to the central bus before you can publish. 在发布之前,您需要与中央总线的实时连接。 So MSMQ being federated (on each machine) makes it more available to clients. 因此MSMQ联合(在每台机器上)使其更易于客户使用。

However people are using MSMQ as a local store with Service Bus, so publish locally, then push it over to the bus when a connection is available. 然而,人们使用MSMQ作为具有Service Bus的本地存储,因此在本地发布,然后在连接可用时将其推送到总线。

We are having a good experience with Service Bus instead of MSMQ at the moment. 我们目前正在使用Service Bus而不是MSMQ。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM