Eventuate Tram Saga provides infrastructure for defining and executing orchestration-based sagas. Its Saga DSL defines orchestrators; participant classes route commands to handlers that call service business logic and can send replies. section 11.1.3 section 11.4
The orchestration flow divides responsibilities:
- A SagaManager starts and persists a saga, sends its command messages, subscribes to replies, and invokes the saga to process them. section 11.1.3
- On a reply, the manager retrieves the saga, runs its next step, sends the next command, and saves the updated state. On participant failure, it runs compensating transactions in reverse order. section 11.1.3
- The Eventuate Platform’s Transaction Outbox and Idempotent Consumer patterns support reliable message delivery and processing. section 11.4
FTGO Create Order Saga
The orchestrator creates an Order locally and defines rejection as compensation. It then invokes the Kitchen Service to create a Ticket, handles the reply, and defines ticket cancellation as compensation. The complete saga has six steps, four participants, and four compensating transactions. section 11.2.2 section 11.4
Figure 11.2 Eventuate Tram Saga is a framework for writing both saga orchestrators and saga participants.
See the framework’s two roles: saga orchestrators and saga participants. section 11.1.3
