Build Highly Scalable Applications With RabbitMQ in .NET
HTML-код
- Опубликовано: 27 ноя 2024
- ►► Check out our courses: bit.ly/cdmz-co...
►► Support us on Patreon and get the source code: / codemaze
In this video, I will show you how to use a message broker, RabbitMQ, with an ASP.NET Core Web API application.
Message brokers allow other applications to send and receive messages asynchronously. As a result of this, we can build highly scalable, decoupled applications that don’t rely on synchronous actions.
Having a message broker, like RabbitMQ, to manage our inter-application communication, allows our system as a whole to scale much easier.
It is one of many message brokers, that handles accepting, storing, and sending messages.
FOLLOW US ON SOCIAL MEDIA!
►► / marinko-spasojevic
►► / codemazeblog
►► / codemazeblog
Thank you all for watching and for your support.
►► If you want to master Web API development using best practices, check out our Web API book: bit.ly/3x75ZMM
►► Also, to build great full-stack apps with Blazor, check out our course: bit.ly/3Pw3Y33
Nice tutorial thanks!
You're welcome! Thank you too for watching.
Hi I have a question. I am seeing you are using "using statement" to create a channel every time you need to send out message and is it better to keep the channel alive until the service stops or restarts? otherwise you will use more resource this way? I am just curious thank you.
Hi. To be honest, this is something that should be tested in each app as the memory consumption can vary. By reading documentation, you can see that connections should be long-lived, but channels can be both. You can share them but you can close them as well.
Thanks, it helped a lot.
Could you also tell me how to consume messages if I have another Web API? Currently, I have a RabbitMQ consumer connection set up and am using background services to listen to the queue.
Are there any other ways to implement this?
This is the video about Event Driven Architecture where you can find two consumers, so maybe it can help you. Basically, you just create topics and either publish or send events (depends what you want from the consumer part). ruclips.net/video/S3IAVii92xw/видео.html
@@CodeMaze Thanks
Can you also show us how to create multilingual applications using API
Hi. Good idea. I will have it in mind for sure. Localization is a powerful feature in .NET.
Can Rabbit Mq be part of new updated .net book.?
Hi. No. I don't think so. IT would be a bit overkill for the Web Api book beacuse it doesn't have anything to do with Web Api development.
can I have the code so I can test it?
specially the file inside the Dto and Data folders? thank you
Hi. The source code is available for the patreon members. Also, the dto is a simple class with a few properties and the DtContext is a simple db context class. Nothing too special there related to RabbitMq.
I tried this but not getting any exchange or queues in rabbit mq
You can watch this MassTransit video where I show those exchanges and queues ruclips.net/video/dyPXafpoEjQ/видео.html
@@CodeMaze I tried this video too but still there are not exchange or queues in the Rabbitmq UI spined in docker
I really don't know why that is. As you can see from that video, both exchanges and queues are there. They must be.
@@CodeMaze Amazing this is that if I delete the rabbitmq Image then also every things working well
If you have 2 min, can you take a look what I am dong wrong ? its will take hardly 2-3 min .