Playing with Saga pattern

This repository contains a WebAPI with an endpoint for initiating a Saga, implemented with Rebus.

The Saga pattern is meant for long-lived processes in a distributed environment.

SagaPatternWithRebus project has the following process: Subscribe to newsletter -> Send welcome email -> Welcome email sent -> Send follow up email -> Follow up email sent -> Saga is completed

You can find a docker-compose.yml file that will help you quickly set-up PostgresDB and RabbitMQ.

Resources

Other solutions for the Saga pattern

  • Saga overview 📓MassTransit
  • Saga using Wolverine (next generation .NET Mediator and Message Bus) and MartenDB (Transactional DocumentDB and EventStore on PostgreSQL)
  • Azure Functions is also a great fit for long-running transactions. Azure Durable Entities can be used as a Saga orchestrator, and it can hold the Saga data. Azure Functions is serverless and provides many features.
Other