What does MassTransit add to RabbitMQ?

北战南征 提交于 2019-11-29 23:50:47

Things that MT adds on top of just using RabbitMQ:

  • Multithreaded, concurrent consumers
  • Message serialization, including interfaces, and versioning
  • Automatic exchange bindings, publish conventions
  • Sagas, including persistent state via NHibernate
  • Performance counters for your services
  • Message headers
  • Fault handling

Those are just a few, some more significant than others. The fact that the bus hosts your consumers, handlers, sagas, and manages all of the threading is probably the biggest advantage, and the fact that you can host multiple buses in the same process.

Serialization is the next biggest benefit, since that can be painful to figure out, and getting an interface-based message contract with automatic deserialized into types (including dynamically-backed interface types) is huge. Publishing a single class that implements multiple interfaces, and seeing all interested consumers pick up their piece of the message asynchronously is just awesome in production as new interfaces can be added to producers and downlevel consumers are unaffected.

Those are a few, you can check out the documentation for more at http://masstransit-project.com/MassTransit/understand/additions-to-transport.html, or give the recent .NET Rocks! podcast a listen for some related content by yours truly.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!