Introduction
Milvasoft.Messaging provides models and configuration for message broker and service bus operations, built on MassTransit and RabbitMQ.
Its main purpose is to keep the models that a publisher and a consumer must share in one library, and to give an abstraction for publishing them. A typical setup is a web application that publishes a command (for example "send this e-mail") to RabbitMQ, and a separate consumer service that listens to the queue and does the work.
Who it is for
.NET developers who want to move work such as sending e-mail out of their main application and into separate services that communicate over RabbitMQ.
Main features
AddMilvaMessagingservice registration that connects your application to RabbitMQ (URI, user name, password).- A ready-made publisher,
ICommandSender, with methods for the library's commands:PublishSendMailCommandAsyncPublishLogAuditCommandAsyncPublishAddNotificationCommandAsyncPublishSendPushCommandAsyncPublishSendLiveActivityCommandAsyncPublishRemovePushTokensCommandAsync
- Shared command contracts such as
ISendMailCommandthat both sides reference. RabbitMqBusConfiguratorfor building a MassTransit bus in a consumer project.- Queue name constants in
RabbitMqConstants(for exampleMailServiceQueueName).
You can also publish commands manually instead of using the ready-made publisher.
Requirements
- .NET 10
- RabbitMQ
License
MIT License.
Links
- GitHub repository: github.com/Milvasoft/Milvasoft.Messaging
- NuGet package: Milvasoft.Messaging
- RabbitMQ on Docker Hub: hub.docker.com/_/rabbitmq