简体   繁体   中英

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 ?
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.

MSMQ on the other hand is a lightweight store-and-forward queuing system, which supports point-to-point one way messaging.

Service Bus:

  1. depends on SQL Server, and
  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.

Pros

  • Service Bus allows you to publish over tcp and http which is cool, and gives you greater decoupling.
  • Service Bus is a sql database so your Disaster Recovery is WAY simpler and a lot cheaper to implement.

Cons

  • Service Bus is centralised, and MSMQ is federated, so potentially more scalable. Although you can scale out with more nodes in 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.

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.

We are having a good experience with Service Bus instead of MSMQ at the moment.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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