# The saga pattern is compensating transactions with better marketing

DevFeed: [The saga pattern is compensating transactions with better marketing](<https://devfeed.tech/articles/the-saga-pattern-is-compensating-transactions-with-better-marketing-94471.md>)

Original publisher: [Read original article](<https://ankit-rana.com/logs/68-sagas-are-compensating-transactions/>)

Author: hello@ankit-rana.com

Published: 2026-10-22T00:00:00Z

Content type: article

Language: en

Sources: [Ankit Rana | Mechanical Sympathy](<https://devfeed.tech/sources/ankit-rana-mechanical-sympathy.md>)

Topics: [Transactions](<https://devfeed.tech/topics/transactions.md>), [acid](<https://devfeed.tech/topics/acid.md>), [Publish-subscribe pattern](<https://devfeed.tech/topics/pubsub.md>)

Tags: [architecture](<https://devfeed.tech/tags/architecture.md>), [atomic](<https://devfeed.tech/tags/atomic.md>), [availability](<https://devfeed.tech/tags/availability.md>), [compensating-transactions](<https://devfeed.tech/tags/compensating-transactions.md>), [distributed](<https://devfeed.tech/tags/distributed.md>), [distributed-transactions](<https://devfeed.tech/tags/distributed-transactions.md>), [email](<https://devfeed.tech/tags/email.md>), [isolation](<https://devfeed.tech/tags/isolation.md>), [microservices](<https://devfeed.tech/tags/microservices.md>), [observable](<https://devfeed.tech/tags/observable.md>), [payment](<https://devfeed.tech/tags/payment.md>), [reliability](<https://devfeed.tech/tags/reliability.md>), [rollback](<https://devfeed.tech/tags/rollback.md>), [saga](<https://devfeed.tech/tags/saga.md>), [transactions](<https://devfeed.tech/tags/transactions.md>)

## AI overview

A saga trades a single transaction's isolation for independently committed service steps: intermediate states are visible, and failures require new compensating actions rather than rollback. Those actions can fail too, so the article calls for idempotent steps and compensations, retries, timeouts, durable and queryable saga state, and human escalation when compensation cannot succeed. It recommends ordering reversible work first and irreversible actions, such as sending confirmation, last; where possible, reserve resources before finalizing them. Choreography avoids a coordinator but leaves workflow and progress scattered across services. Orchestration centralizes sequencing, state tracking, recovery, and compensation, at the cost of a coordination component. The pattern adds substantial failure-path complexity; the author advises using it when service boundaries make a local transaction impossible, and notes that visible intermediate states must be acceptable to the product.

## Source excerpt

A saga replaces one atomic transaction with a sequence of local transactions, each of which commits and becomes visible immediately, so there is no isolation and intermediate states are observable. When a later step fails, earlier ones are undone by running compensating actions, which are forward operations with their own failure modes rather than a rollback. The difficulty is not the mechanism but the steps that cannot be compensated, such as an email already sent or a payment already captured, which have to be designed around rather than reversed.