Getting Started With MassTransit (Beginner Friendly)

  Рет қаралды 17,673

Milan Jovanović

Milan Jovanović

Күн бұрын

Get the source code for this video for FREE → the-dotnet-weekly.ck.page/mas...
☄️ Master the Modular Monolith Architecture: bit.ly/3SXlzSt
📌 Accelerate your Clean Architecture skills: bit.ly/3PupkOJ
🚀 Support me on Patreon to access the source code: / milanjovanovic
MassTransit is an open-source distributed application framework for .NET. It provides a messaging abstraction on top of the supported message transports. MassTransit lets you focus on adding business value instead of worrying about messaging complexity.
Health checks provide a way to monitor and verify the health of various components of an application, including databases, APIs, caches, and external services. Let's see how to implement health checks in ASP.NET Core. MassTransit supports many message transport technologies. Here are a few that are popular:
- RabbitMQ
- Azure Service Bus
- Amazon SQS
- Kafka
In today's video, I'll show you how to install and configure MassTransit in .NET. We'll connect MassTransit to a few message brokers - RabbitMQ and Azure Service Bus. And we will also cover how to publish and consume messages with MassTransit.
Check out my courses: bit.ly/3PupkOJ
Using MassTransit with RabbitMQ and Azure Service Bus
www.milanjovanovic.tech/blog/...
Join my weekly .NET newsletter:
www.milanjovanovic.tech
Read my Blog here:
www.milanjovanovic.tech/blog
Chapters
0:00 Installing MassTransit
0:51 What MassTransit does for you
1:45 Configuring MassTransit
3:41 Publishing messages with MassTransit
6:49 Consuming messages with MassTransit
11:18 Adding different message transports

Пікірлер: 51
@MilanJovanovicTech
@MilanJovanovicTech 5 ай бұрын
Get the source code for this video for FREE → the-dotnet-weekly.ck.page/masstransit Want to master Clean Architecture? Go here: bit.ly/3PupkOJ Want to unlock Modular Monoliths? Go here: bit.ly/3SXlzSt
@daddy2claire
@daddy2claire 5 ай бұрын
Thanks for this video! Subscribed! I already have some patterns in mind. Planning to start with Pub/Sub, then adding Competing Consumers and so on.
@MilanJovanovicTech
@MilanJovanovicTech 5 ай бұрын
Glad it was helpful! And welcome aboard :)
@MattOsbun
@MattOsbun 3 ай бұрын
To the point and easy to follow. Thanks for this!
@MilanJovanovicTech
@MilanJovanovicTech 3 ай бұрын
You're welcome!
@Myuuiii
@Myuuiii 5 ай бұрын
man this is exactly what i needed yesterday 😂
@MilanJovanovicTech
@MilanJovanovicTech 5 ай бұрын
Better late than never 😅
@Myuuiii
@Myuuiii 5 ай бұрын
@@MilanJovanovicTech hahaha exactly, thanks for the video! I’ll be taking a closer look in a bit ⭐️
@valterdebrito3990
@valterdebrito3990 4 ай бұрын
The best! Thanks for the video!!!!
@MilanJovanovicTech
@MilanJovanovicTech 4 ай бұрын
You're welcome!
@lalitap-ei5mc
@lalitap-ei5mc 5 ай бұрын
Excellent Video.
@MilanJovanovicTech
@MilanJovanovicTech 5 ай бұрын
Thank you very much!
@mohamedhajjaj2014
@mohamedhajjaj2014 5 ай бұрын
Thanks bro
@MilanJovanovicTech
@MilanJovanovicTech 5 ай бұрын
Any time
@xxXAsuraXxx
@xxXAsuraXxx 5 ай бұрын
show us the advanced topics such as how to to do Microservices with Saga and routing slip :)
@MilanJovanovicTech
@MilanJovanovicTech 5 ай бұрын
Nothing fundamentally changes in a messaging based system when you move the consumers to other services - except you're now distributed. But that's an infrastructural concern. The programming model is the same.
@mkmerlinyt
@mkmerlinyt 5 ай бұрын
Milan, are you planning to extend your course with Messaging?
@MilanJovanovicTech
@MilanJovanovicTech 5 ай бұрын
That's a great idea honestly, I'm adding that as a project and I'll see when I can fit it into my schedule :)
@funkydiddykong
@funkydiddykong 5 ай бұрын
One thing I would like to see is how to set up a durable message queue in case there are network issues between you and where you are publishing and how to correctly handle it without data loss. An additional requirement might be that message ordering is important, so just resending "dead letter" messages is not the best idea.
@MilanJovanovicTech
@MilanJovanovicTech 5 ай бұрын
That's an interesting topic
@funkydiddykong
@funkydiddykong 5 ай бұрын
@MilanJovanovicTech it's a problem I have had lately where inbound on-premises services sometimes disconnect for the service bus resulting in some data loss over long periods.
@MattOsbun
@MattOsbun 3 ай бұрын
If MassTransit implements this like NServiceBus does, it's an under the hood inbox/outbox pattern. But I'm also looking to see how MT handles this.
@MattOsbun
@MattOsbun 3 ай бұрын
Also, ordering should be irrelevant in a messaging system. Udi Dahan has some interesting thoughts on race conditions in messaging systems, but his conclusion is that there are no race conditions, just business processes that need to be explored more deeply.
@felipemarques3997
@felipemarques3997 5 ай бұрын
Millan, in this example you are using, your communication is in the same solution. Does MassTransit support communication between different solutions?
@_JustBeingCasual
@_JustBeingCasual 5 ай бұрын
Its a messaging queue, so you are directly connected to the queue, so why would it matter what solution you are using?
@felipemarques3997
@felipemarques3997 5 ай бұрын
​@@_JustBeingCasual I read that MassTransit use namespace to configure the messaging . So in differentes solutions with differents namespace it would be a problem.
@_JustBeingCasual
@_JustBeingCasual 5 ай бұрын
@@felipemarques3997 Hmm interesting, the contracts at least would be shared between solutions right? So in that case there could not be any issue, i think.
@felipemarques3997
@felipemarques3997 5 ай бұрын
@@_JustBeingCasual Yes, exactly. But how do we share contracts between two different solutions?
@_JustBeingCasual
@_JustBeingCasual 5 ай бұрын
​@@felipemarques3997 There are different ways to do that, like including a '.dll' file, create a nuget package for those contracts. Well, that's the two ways that I can think off at the moment.
@PatrickMwangi-gh2oi
@PatrickMwangi-gh2oi 2 ай бұрын
Hi Milan. Did both consumers get the same message because you used the in-memory bus and both consumers run in the same process? If maybe you used SQS as transport and have consumers in separate applications would these be competing consumers?
@MilanJovanovicTech
@MilanJovanovicTech 2 ай бұрын
Yeah, that's the reason. Competing consumers happen if you go distributed, and using the same endpoint (queue). You can also configure consumers to use different endpoints to get a topic-like behavior.
@MohamedibnAhmed
@MohamedibnAhmed Күн бұрын
why when i seperate the project the publisher is publishing but the consumer never Consume i am using rabbitmq?
@MilanJovanovicTech
@MilanJovanovicTech 13 сағат бұрын
Does the consumer connect to RabbitMQ?
@MohamedibnAhmed
@MohamedibnAhmed 8 сағат бұрын
yes it is connected to RabbitMQ and when i use RabbitMQ Without MassTransit it works well
@cmonstokeST4
@cmonstokeST4 Ай бұрын
If I want send a message to an azure service bus topic why do I need to create and register a consumer?
@MilanJovanovicTech
@MilanJovanovicTech Ай бұрын
You don't need a consumer to send... You need a consumer to handle the message.
@cmonstokeST4
@cmonstokeST4 Ай бұрын
@@MilanJovanovicTech must be something wrong with my code then as it would not send until I created one 🤔 thanks for the reply
@MilanJovanovicTech
@MilanJovanovicTech Ай бұрын
@@cmonstokeST4 I think for ASB to work with MassTransit you'll need to be on the Premium plan. Check their docs for more details.
@eliezerbwana2526
@eliezerbwana2526 3 ай бұрын
Very helpful video. But I've a question, is it recommended to use the Inmemory process in modularMonolith??
@MilanJovanovicTech
@MilanJovanovicTech 3 ай бұрын
Recommended? No. But it is "good enough" that it gets the job done.
@mostrealtutu
@mostrealtutu 5 ай бұрын
im sometimes wondering if people even read docs, looks like they dont, according to all those comments : (
@MilanJovanovicTech
@MilanJovanovicTech 5 ай бұрын
I'm sure they do, when they need to build something 😁
@joga_bonito_aro
@joga_bonito_aro 5 ай бұрын
Noice. How about a comparison video between MassTransit and Wolverine? Wolverine is the new hotness on the block and looks very promising for decoupled systems. Especially when integrated with MartenDB, Wolverine looks like a must use tool.
@MilanJovanovicTech
@MilanJovanovicTech 5 ай бұрын
Doesn't seem nearly as powerful as MassTransit, and a bit too opinionated for my liking. I'll do some research, though 👌
@joga_bonito_aro
@joga_bonito_aro 5 ай бұрын
@@MilanJovanovicTech I think you're perfectly right. But I can't quite put my finger on it why People think Wolverine is as good as it's hyped up to be
Build Clean Messaging in .NET with MassTransit
21:44
Nick Chapsas
Рет қаралды 95 М.
Getting Started with Modular Monoliths in .NET
12:37
Milan Jovanović
Рет қаралды 21 М.
Despicable Me Fart Blaster
00:51
_vector_
Рет қаралды 23 МЛН
تجربة أغرب توصيلة شحن ضد القطع تماما
00:56
صدام العزي
Рет қаралды 58 МЛН
Cursor Pagination is the FASTEST - But you can't use it if...
13:14
Milan Jovanović
Рет қаралды 17 М.
Modular Monoliths Are The New Microservices
31:08
TaleLearnCode
Рет қаралды 23 М.
Building Clean Messaging in .NET with NServiceBus
26:22
Nick Chapsas
Рет қаралды 21 М.
MassTransit Bus Stop - Request Response via Messaging (RPC)
27:41
Chris Patterson
Рет қаралды 3 М.
An introduction to MassTransit using RabbitMQ (In ASP.NET Core)
22:11
DotNet Core Central
Рет қаралды 46 М.
First Look at .NET Aspire - Distributed Applications in .NET 8
12:56
Milan Jovanović
Рет қаралды 31 М.
“.NET 9 Is Killing MediatR, MassTransit & Wolverine!”
11:59
Nick Chapsas
Рет қаралды 82 М.
Как использовать Masstransit? | RabbitMQ
13:39
Easily Deploy a .NET Application to AWS Elastic Beanstalk
16:32
Milan Jovanović
Рет қаралды 11 М.
Что не так с раскладушками? #samsung #fold
0:42
Не шарю!
Рет қаралды 214 М.
iPhone socket cleaning #Fixit
0:30
Tamar DB (mt)
Рет қаралды 15 МЛН
Battery  low 🔋 🪫
0:10
dednahype
Рет қаралды 12 МЛН
Самые крутые школьные гаджеты
0:49
1$ vs 500$ ВИРТУАЛЬНАЯ РЕАЛЬНОСТЬ !
23:20
GoldenBurst
Рет қаралды 1,8 МЛН