Report Bug
TodoList-Messaging is a Web API created as an example, the main purpose of which is to learn and see how to work with message-brokers (RabbitMQ) and MassTransit framework on the .NET platform.
- CRUD operations on the 'User' entity
- CRUD operations on the 'Todo' entity
- Sending an email notification when the status of a 'Todo' entity changes
The available endpoints can be viewed at link http://{HOST:PORT}/swagger/index.html after the project has been started in 'Development' mode:
- .NET 7
- Postgres
- Entity Framework Core
- RabbitMQ
- MassTransit
- MediatR
- FluentValidation
- AutoMapper
- xUnit
- NSubstitute
- FluentAssertions
- Rider
- Docker
- Clone the repository
> git clone https://github.com/MrKonstantinSh/TodoList-Messaging.git
- Go to the project folder
> cd ./ProjectFolder
- Create and start docker containers
> docker compose up
- Apply migrations
> dotnet ef database update -p src/TodoList.WebApi/TodoList.WebApi.csproj -s src/TodoList.WebApi/TodoList.WebApi.csproj --connection 'Host={HOST};Database=todos;Username={USERNAME};Password={PASSWORD}'
Diagram of interaction of system elements
TodoList.WebApi - Web API that provides the ability to perform CRUD operations on User and Todo entities. When a Todo entity's status changes, it sends a message to the message broker (RabbitMQ) using the MassTransit framework.
TodoList.EmailSender - A service that retrieves messages from a message broker (RabbitMQ) using the MassTransit framework. And performs email distribution based on the content received from the message.
TodoList.MessagingContracts - Contains the contracts of messages sent (received) to (from) the message broker.
The core functionality of Web Api is covered by unit tests. To run the tests you need to execute the following command:
> dotnet test
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
Konstantin Shulga - mrkonstantinsh@gmail.com
Project Link: https://github.com/MrKonstantinSh/TodoList-Messaging