NServiceBus vs MassTransit [closed]
Asked Answered
F

5

103

I'm struggling with a pros and cons list regarding NServiceBus and MassTransit.

Now I know there is already a thread in here, but it doesn't really answer my questions.

Here is what I've read so far:

  1. NServiceBus, yes it's licensed and it doesn't come for free.
  2. MassTransit, yes it's open source, but the documentation seems to lack somewhat.

NServiceBus is older, and has more references. It's hard to find stuff about MassTransit, but I'm open-minded. However I have to deliver a solid solution, and so I have to ask.

So please, someone with experience with both frameworks. Why should I choose NServiceBus? OR Why should I choose MassTransit?

Is it performance, security, scale or?

Fearful answered 30/11, 2012 at 14:46 Comment(1)
There's now a sample that shows how MassTransit and NServiceBus can be mixed, by adding a pipeline behavior to NServiceBus that allows it to understand messages sent by MassTransit. docs.particular.net/samples/pipeline/masstransit-messagesUis
H
118

If I had to summarize, here's what I'd say:

If you need commercial support, go for NServiceBus. If you're comfortable with using forums as a means of support, MassTransit is a great option. The developers have been very responsive to our issues so far. If you choose MassTransit, now you will choose between MSMQ and RabbitMQ. If you need DTC go with MSMQ. If you want more features and better administration, go with RabbitMQ.

On our project, we switched from NServiceBus to MassTransit for two reasons:

  1. MassTransit is free
  2. We love RabbitMQ

I've used both frameworks. I've used MassTransit longer than NServiceBus. Here are the highlights as I see them.

Cost:

  • MassTransit is Apache 2.0 licensed and free for commercial production use, whereas NServiceBus is not.

Support:

  • As Udi mentioned, there is an option for commercial NServiceBus support, I haven't seen that for MassTransit.

Transport:

  • MassTransit supports MSMQ and RabbitMQ
  • NServiceBus supports only MSMQ RabbitMQ is supported in NServiceBus 4+

RabbitMQ vs MSMQ:

  • MSMQ support DTC (distributed transaction coordinator) for transactions involving multiple processes on potentially multiple machines (e.g. SQL server, Windows Service)
  • RabbitMQ has an excellent Administration interface
  • MSMQ has been around longer and is a Microsoft product
  • RabbitMQ is newer, open source, free, and sponsored by VMWare
  • MSMQ is installed on most Windows machines by default

Udi Dahan and the MassTransit guys (Chris Patterson, Dru Sellers, and Travis Smith) are all brilliant people.

Hesler answered 1/12, 2012 at 20:45 Comment(5)
Good answer, Clay. Allow me to add that in the next version (coming out in a couple of weeks) NServiceBus will be supporting ActiveMQ as well. We've been intentionally delaying our support for RabbitMQ until we could give a robust de-duplication story to compensate for the lack of DTC - that's planned for next year. MassTransit doesn't do this de-duplication (but it might be on their roadmap too, I don't know).Camelopardus
Great to hear. The lack of true end-to-end transactions would be a deal-breaker for mission-critical systems.Hesler
We have set up a system using nServiceBus and we really like the responsiveness from the community and overall it is pretty easy to configure. We use MSMQ for now since it is more common ground. However even though nServiceBus has many licensing models I am still pretty confused on which license I'd (or our team would) have to buy in order to be in agreement with the terms of use. The team counts about 5 people, each of them will program against the API, but more in POC-mode (yes in production :)) for now. MassTransit is next to review. It seems pretty well documented.Augean
MassTransit does not have commercial support nor do any of us have plans on offering it, at this time. I would suggest the mailing list for MassTransit support but I do have MassTransit tagged stuff show up in my RSS reader, so I normally respond within a day or two on SO.Bibliomancy
For MT, you can also go to a Gitter conversation: gitter.im/MassTransit/MassTransitBeckett
C
71

As the original author of NServiceBus, I'm probably a bit biased towards my own technology, but I'll try to keep this as balanced as I can.

Transport support

Both NServiceBus and MassTransit support RabbitMQ and Azure Service Bus, but NServiceBus also supports:

Not only that, but NServiceBus also enables you to transparently run different endpoints on different transports with its Transport Bridge, a huge deal when integrating on-prem systems with new cloud functionality.

On the topic of RabbitMQ

The argument could be made that NServiceBus has stronger support for RabbitMQ - for example, in its delayed delivery functionality while Mass Transit states that their "plugin is still considered as experimental. It is supported by MassTransit, but we cannot guarantee anything more than the plugin guarantees itself."

We also work very closely with the RabbitMQ team, contributing to the .net SDK for the benefit of the whole ecosystem, and continue to be recognized for it, like in this tweet: https://twitter.com/RabbitMQ/status/1547946916419231744

enter image description here

When it comes to Azure Service Bus

The level of collaboration we have with the Azure Service Bus team is even higher, with over 70 PRs to their .net core SDK.

When you use NServiceBus, you benefit from the full depth of that knowledge.

Tooling

This is the biggest difference.

Once you've built a substantial system, having visibility into how all the different moving parts talk to each other becomes really important. MassTransit doesn't have much in this area beyond a small integration through a Diagnostic Source to 3rd party tools like Application Insights or Open Trace.

The Service Platform around NServiceBus goes quite a bit farther, giving you the ability to see sequence diagrams across all endpoints with ServiceInsight:

Sequence diagrams with ServiceInsight

You can also get the logical view of all of your endpoints and messages:

The logical view of an NServiceBus system

In essence, you get living documentation of your system's architecture.

Management & Monitoring

This is another area where MassTransit doesn't have very much. When a 3rd party system you're integrating with becomes unavailable and a bunch of messages in your system end up in the error queue, the only solution MassTransit has for you to manually move those messages back later using the RabbitMQ Shovel plugin.

The Service Platform around NServiceBus includes monitoring of that error queue, graphical tooling to see what the causes were of those errors, as well as the ability to replay groups of those failed messages and see that they were actually processed successfully all in a simple web app called ServicePulse.

Failed message grouping with ServicePulse

There is also visualization of health checks which are run periodically that can provide early warnings of problems before messages start failing.

And finally, there's the performance monitoring available in the platform:

NServiceBus performance monitoring

You really get the full package when it comes to production support.

Long-term support & Backwards-compatibility

While the Mass Transit folks have always been extremely good at helping anyone who has questions about it on Gitter or their Google Group, I don't think they provide bug fixes on older versions. When your production systems have been around for a couple of years, and you can't just upgrade everything all the time, that starts to be important.

With NServiceBus support includes:

  • 2+ years for each major version
  • An additional 2 years of extended support
  • Guaranteed response times on critical issues
  • 24x7 availability

Risk Management

Chris Patterson, the creator of MassTransit, is a long-time friend and his contributions to the community over the years are such a labor of love that I have nothing but admiration for him.

The thing is, for a number of years now, Chris is the only person that's been working on, or even capable of working on MassTransit. If anything were to happen to him, and I wish him nothing but my very best, I really don't know who could fill his shoes.

For mission-critical projects and products where organizations want to make sure they're building on a solid foundation for years to come, this risk may be untenable. The larger organization around NServiceBus, with dozens of full time staff, and deep partnerships with Microsoft, AWS, and RabbitMQ, would probably be the less risky choice for those environments.

Consulting & Training

From an offline perspective, there are public courses available around the world on NServiceBus as well as many consultants who can be brought on-site to kickstart a project or to assist in case of problems. I've heard from several companies that decided to switch from MassTransit to NServiceBus because they couldn't get someone on-site when they needed it.

Licensing

What some people still don't know about NServiceBus is that it is FREE for personal use and startups, and even for some limited production use too.

FREE for personal use and startups

When it comes to commercial use, the licensing models around NServiceBus are very flexible, as the broad spectrum of customers indicates, and can be well justified to management. Of course, with MassTransit, the licensing is free.

Camelopardus answered 1/12, 2012 at 15:9 Comment(6)
I'd like to hear what you have to say about MassTransit in a non-biased fashion. Trying to 'defend' the MassTransit implementation in a way. I really like nServiceBus though, we are just struggling with the license-cost trying this in a real production environment but only for newly added features in our platform. The proof of concept code you might say.Augean
What about more technical differences? What about reliability, deduplication, sending big messages, etc. How do these frameworks/playforms compare? Is there any list that compares several messaging busses this way?Spate
As far as I know, @Steven, MassTransit doesn't have the deduplication functionality found in the NServiceBus Outbox feature. Part of the problem with providing the kind of list you want is that each of these technologies continue to evolve, which would make any list of that kind go stale.Camelopardus
@udidahan, you should probably update your view as we are closing to 2021. I want to know if MT is somewhat enhanced its core tech in the past few years as well as NServiceBusParfitt
Yes, Volkan. Both MassTransit and NServiceBus have continued evolving over time.Camelopardus
Bizillions of time better NServiceBus. Rather the money paid...Avalanche
B
13

I know it's late to chime in on this question, but for bingleability's sake, I have to mention Rebus (which I happen to be the primary author of).

Rebus is about 8 years old now, and it has been used to move money around and control power plants from the get-go.

It supports most basic queueing systems, like MSMQ, RabbitMQ, Azure Service Bus, Azure Storage Queues, Amazon SQS, etc., but it also supports more funny stuff like using MSSQL, PostgreSQL, and Oracle as transports.

The documentation wiki is fairly comprehensive, although many people seem to get by, because Rebus' APIs are so easily discoverable.

Rebus has always been (and will always be) completely free. It's MIT-licensed, so you can basically do with it what you feel like.

If you end up as a serious Rebus user, and you need a formal support agreement and extra tooling, you can subscribe to Rebus Pro, which is offered by Rebus FM (the company behind Rebus).

The "extra tooling" mentioned above currently comes in the form of Fleet Manager, which can help with things. For example, Fleet Manager completely replaces error queues (i.e. dead-letter queues), so failed messages get stored there instead. This means that failed messages can be viewed, managed, and retried anytime with a few clicks in Fleet Manager.

Bead answered 15/2, 2019 at 14:33 Comment(2)
Rebus is way underrated. It's a true lightweight gem in the .NET ecosystem.Keefe
Yeps...@mookid8000. Having worked with the three of them...and seeing everything....yours would be chosen with NServiceBus. Keep going with ur amazing project!Avalanche
P
13

Just to give a more up to date answer, I've developed professionally with both ecosystems and they both now support a broad range of MQ technologies, and .NET Core.

I used NServicebus a few years back on a new cloud product, we needed .NET Core which Mass Transit didn't support at the time. I have to say - it's a lovely thing to use as developer, there's a lot of nice one liners, great tooling/monitoring and the documentation is really good.

Various levels of support and license are available, and on one occasion we needed some help, it was good quality.


I've been using Mass Transit for a few months at a new company, and they much prefer having a free, open-source library. The journey has been a bit rockier - the documentation for MT is lacking in places, and a lot of examples/issues are out of date. There's not quite the range of advanced features either, but you may well not need them for their use case.

It works fine though, and the MT developers seem to put a LOT of effort into supporting their OSS - way beyond what you could reasonably expect.

So personally, my TLDR would be - get NServicebus if your company can be convinced to pay for it, but MT is a serviceable alternative and the best you can get for free.

Poodle answered 22/6, 2020 at 13:41 Comment(0)
S
5

You could always use Shuttle (FOSS): https://github.com/Shuttle/shuttle-esb :)

Documentation (always improving): http://shuttle.github.io/shuttle-esb/

The Shuttle project has been going almost 2 years and is used production systems. It'll be a matter of choosing what resonates with you.

NServiceBus has a good track record. I have used it previously on a production system (1.9) but not since it has gone commercial (the point at which I started with Shuttle).

I haven't tried MassTransit.

I guess all your options will have the basics (command / event / pub-sub). However, NServiceBus does have sagas and the data bus stuff although I reckon it is easy enough to handle data outside of the service bus itself such as in your endpoint message handlers. I don't know whether MassTransit has sagas/data bus but Shuttle certainly doesn't.

Another consideration is probably how you intend using the service bus. If it is to be part of a product then for a commercial option such as NServiceBus you would need to consider the cost implications for users of your product and although it is still something that needs to be considered for in-house development it can certainly be justified.

Stan answered 1/12, 2012 at 5:27 Comment(1)
MassTransit does have sagas: docs.masstransit-project.com/en/latest/overview/saga.htmlHesler

© 2022 - 2024 — McMap. All rights reserved.