A saga is a protocol for executing distributed transactions. Simple Sagas is a framework for defining and executing sagas using Kafka.

The framework consists of:

  • A Saga builder DSL to define saga requests, and a client API to submit requests and handle the response.
  • A saga coordinator that receives saga requests, guides them through the full execution lifecycle, and publishes a response when the saga is complete.
  • Action processors that execute the individual actions that make up the saga.

Kafka is used for all inter-process communication and state persistence, and the framework components rely heavily on Kafka Streams for their implementation.

Design goals

Simple Sagas is designed to make building saga applications easy:

  • Functional interfaces - everything should be defined and created in a functional, declarative style, with no complex ordering dependencies to figure out (e.g. you need to invoke “A” before you can create “B”).
  • Minimised Kafka exposure - You don’t need to be a Kafka streams expert to use the framework.
  • Sensible defaults - everything works out the box with as little configuration as possible, yet it’s still possible to fine tune and override everything.
  • Topic management - topic creation is integrated into the framework. Any topic that is required will be created by the platform as required.

Next Steps

Try one of the following: