This repository demonstrates a simple implementation of MassTransit's Transactional Outbox pattern in a .NET solution. The solution consists of two projects: Publisher and Consumer. The Publisher project publishes messages to a message queue, and the Consumer project processes those messages.
- .NET SDK (version 8 or higher)
- Docker (for running rabbitmq, sql server)
-
Clone this repository:
git clone https://github.com/yourusername/masstransit-transactional-outbox-demo.git
-
Run docker compose:
docker compose up -d
-
Uppdate database migrations:
dotnet ef database update -s Publisher
dotnet ef database update -s Consumer
-
Run both projects:
dotnet run --project Publisher
dotnet run --project Consumer