Masstransit Explanantion in Layman Terms

41 views
Skip to first unread message

Mohammed Abid Mallick

unread,
Mar 6, 2019, 9:32:45 AM3/6/19
to masstransit-discuss
Hi,

I was wondering if someone could explain what MassTransit does in layman's terms? I looked at the introduction page on the website but i still find myself stumped.

thanks in advance for any help.

Mark Dawson

unread,
Mar 7, 2019, 2:32:53 AM3/7/19
to masstransit-discuss
Hi Mohammed,

In it's simplest terms MassTransit is a framework much like ASP.NET is a framework - they both sit on top of a fundamental technology (HTTP in the case of ASP.NET, a Message Queue for MassTransit) and handle all of the boilerplate stuff like receiving messages, serialisation & deserialisation between wire format and your strong types, and route the messages through an internal pipeline into the code you have declared is able to handle those messages.

So, a message consumer in MassTransit is very much like a Controller in ASP.NET. Like ASP.NET, MassTransit allows you to customise the pipeline to do other things before the message reaches your code (think of the Authorisation filters in the ASP.NET pipeline), or after you have processed the message.

MassTransit has different kinds of consumers to add more boilerplate implementation to your solution (Sagas, Routing Slips, Turnout) but in essence these are still simply message consumers that do slightly different things with the messages they receive before the message gets passed to your code.

Hope that helps :)

César Demicheli

unread,
Mar 7, 2019, 3:24:13 PM3/7/19
to masstrans...@googlegroups.com
When I had to explain MassTransit to my coworkers, I liked to use Entity Framework as an analogy.
I think it's more likely for them to understand it that way: instead of having to work with ADO.NET and the SqlConnection, SqlCommands, pure SQL queries, etc, you just normally use EF to make the mappings between POCO classes and tables, define the class inheritance strategies, navigation properties, etc. 
With MassTransit, instead of working with the raw RabbitMQ client and having to refer to every exchange, queue, set their bindings and the occasional routing keys, you just use different message types, configure the consumers, create the SendEndpoints, etc, and that's it; you have all the pipeline created behind the stage and you only need to say what type of message you want to send or publish without much further effort. It even implements certain patterns that save you all the fuss of having to implement them by yourself, like Sagas, or the Request/Response.

Cheers!


--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-dis...@googlegroups.com.
To post to this group, send email to masstrans...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/93ae60bd-7045-4fe5-89dc-36dfedc83daa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages