To start, the following nuget packages are required: Flight cancellations will be sent to a queue where they will be processed by one consumer. Flight orders will be broadcast and can be consumed by multiple consumers. The application example is based on a contrived example of flight orders and flight cancellations. We will also create a simple console app that will receive messages from the queue and the topic. We will be using Azure Service bus to build a simple web app in dotnet core to demonstrate how to send a message (via queues) and publish messages (via topics) from a web application. It's all in the configuration and once it's all set up, you can focus on the core part, which is sending, receiving and processing messages. MassTransit can be set up with a web or console application without too much trouble. MassTransit also offers a Request and Response mechanism where you can send a request and receive a response based on that request. When using publish, the message is broadcast to many consumers. a queue and a single consumer subscribes to this queue. A message is delivered to a specific endpoint. It also provides scheduling messages which it uses Quartz underneath.įrom my understanding, there are three ways that you can send messages using MassTransit. MassTransit refers to this as Observing messages. It also offers other features such as monitoring messages as they are received, consumed, sent and published. With MassTransit, it helps a little that they have provided a framework to do some of the work so that you can focus on sending and consuming messages. If you've ever had to incorporate a messaging system such as RabbitMQ or Azure Service Bus, you may find yourself, like me, writing wrappers or abstractions around it. MassTransit provides a framework that makes it easy to send and publish messages as well as receiving them. At the time of writing, it supports RabbitMQ, Azure Service Bus, and AmazonSqs. MassTransit is a free and open-source library that helps you build message-based applications and services in.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |