Sagaweaw — Saga Orchestration for Spring Boot | Sagaweaw
Skip to main content<br>Every distributed system team hits this<br>A transaction started,<br>got halfway, and stopped.<br>Now you have inconsistent state across services. The payment was charged, the inventory is locked, but there's no order to show for it.<br>Someone writes a recovery script. Another person gets paged. A support ticket appears. And this happens again next week.<br>↩refund() runs automatically — $127.00 returned
↩release() runs automatically — 2 units unlocked
✓No on-call alert. No recovery script. No 2am ticket.
production · order-service · 02:47 AM<br>02:41:03✓POST /charge — $127.00 charged to card<br>02:41:04✓POST /inventory — 2 units reserved<br>02:41:09✕POST /shipping — 503 Service Unavailable<br>02:41:09⚠order #f3a9b2c1 stuck in EXECUTING<br>02:41:10🔔PagerDuty alert — on-call engineer paged<br>With Sagaweaw, instead:<br>02:41:09↩compensating charge-payment → refund()<br>02:41:09↩compensating reserve-inventory → release()<br>02:41:10✓saga #f3a9b2c1 COMPENSATED — no data leaked
The solution<br>Write the business logic. Sagaweaw handles the rest.<br>✓ Compensation runs in reverse order, automatically<br>✓ Exponential backoff retry, per step<br>✓ Full audit trail in your own database<br>✓ OpenTelemetry spans — zero config<br>✓ One Spring Boot dependency — that's it<br>See the full quickstart →
OrderSaga.java<br>return saga<br>.step("reserve-inventory")<br>.invoke(ctx -> inventory.reserve(ctx.itemId()))<br>.compensate(ctx -> inventory.release(ctx.itemId()))
.step("charge-payment")<br>.invoke(ctx -> payment.charge(ctx.amount()))<br>.compensate(ctx -> payment.refund(ctx.chargeId()))<br>.retryPolicy(exponential(3, Duration.ofSeconds(5)))
.step("create-shipment")<br>.invoke(ctx -> shipping.schedule(ctx.orderId()))<br>.compensate(ctx -> shipping.cancel(ctx.orderId()))
.build();
How it works<br>Automatic compensation<br>If any step fails, Sagaweaw executes compensations in reverse order — automatically. No data is left behind.<br>✓ Exponential, fixed, or infinite retry per step<br>✓ Durable state — survives crashes and restarts<br>✓ Pivot point — configurable point of no return<br>✓ Dead letters for surgical manual intervention<br>See the lifecycle →
reserve-inventory
charge-payment
create-shipment
See every saga, in real time<br>The embedded dashboard is your debug lens — live feed, step timeline, retry queue, dead letters, business ID search, and stuck saga detection. All on the port you choose.
localhost:8484/sagaweaw
Everything you need for distributed transactions<br>Built on solid architectural decisions and battle-tested patterns. Free, forever.
Automatic Compensation<br>When a step fails, Sagaweaw runs compensations in reverse order automatically. Your data stays consistent — always.
OpenTelemetry — Zero Config<br>Add OTel to your classpath and saga spans appear automatically in Jaeger, Grafana Tempo, Datadog, or Honeycomb. No wiring needed.
Real-time Debug Dashboard<br>Step timeline, context snapshots, stuck saga detection, business ID search, and batch dead letter reprocessing — on port 8484.
Webhook Alerts<br>One property to get notified on dead letters, stuck sagas, and failure rate spikes. Works with Slack, Discord, Teams, and PagerDuty.
Smart Retry<br>Configurable retry per step: exponential, fixed, or infinite. Each step keeps its own retry policy and backoff strategy.
Centralized Orchestration<br>Full control of the flow from a single coordinator. Every saga knows exactly where it is and what comes next.
Configurable Retention<br>Archive completed sagas after N days. Keep failed sagas longer — your team will want to investigate. Full audit trail preserved.
Your Database, Your Rules<br>Runs on PostgreSQL, MySQL, or H2. State is durably persisted — no Redis, no new cluster, no external service.
Multi-instance Ready<br>Scale horizontally — N instances sharing the same database, no extra coordination. Each saga records which instance created it.
Plays well with what you already use<br>No new tools to learn. Metrics in Prometheus, traces in your OTel backend, logs with MDC — the database you already have. Zero new infrastructure.
Spring Boot<br>Auto-configured
Kotlin<br>sagaweaw-kotlin DSL
PostgreSQL<br>MySQL · H2
Prometheus<br>Auto scraping
Grafana<br>Template included
OpenTelemetry<br>Jaeger · Tempo · DD
Micrometer<br>Native instrumentation
MDC / Logback<br>Enriched logs
Webhooks<br>Slack · Discord · PD
Add spring-boot-starter-opentelemetry and saga spans appear automatically in your OTel backend. See docs →
Up and running in 5 minutes<br>One dependency. No new cluster. No boilerplate.
Add the dependency<br>sagaweaw-spring-boot-starter
Write your saga<br>@Saga + SagaDefinition
Start it<br>sagaManager.start(context)
Full Quickstart Guide →Generate with AI
Open Source · Apache 2.0<br>Ready to stop writing recovery scripts?<br>Free forever. No lock-in. No external server. Just add the dependency.<br>Read the DocsGitHub