resonate-saga-pattern-rust

Coordinate multi-step distributed transactions with compensating rollback actions for Rust Resonate workflows.

6|Updated Jan 8, 2026
One-click install
npx skills add https://github.com/resonatehq/resonate-skills --skill resonate-saga-pattern-rust
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: resonate-saga-pattern-rust
Source: https://github.com/resonatehq/resonate-skills/tree/main/resonate-saga-pattern-rust
Command: npx skills add https://github.com/resonatehq/resonate-skills --skill resonate-saga-pattern-rust

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Coordinates multi-step distributed workflows in Rust that must remain consistent across partial failures by pairing forward actions with compensating rollbacks so overall system state can be unwound safely.

Core Features & Use Cases

  • Forward and compensating actions: Show how to run ordered durable forward steps and dispatch reverse compensations in Rust using Result and match-based enum dispatch.
  • Durable checkpoints and resume semantics: Explain how each forward step becomes a durable checkpoint so the saga can resume after worker crashes.
  • Operational safeguards: Emphasizes idempotent compensations, timeouts, and retry strategies for realistic order processing scenarios (inventory, payment, shipment).
  • Use Case: Implement an order placement saga that reserves inventory, charges payment, and creates shipment, and that reverses completed steps if a later step fails.

Quick Start

Run a Rust saga that reserves inventory, charges payment, and creates shipment for order 12345 and revert completed steps automatically on failure.

Frequently Asked Questions about resonate-saga-pattern-rust

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement distributed transactions with compensating rollback actions in Rust?

Distributed transactions with compensating rollback actions in Rust pair ordered forward steps with reverse compensations using Result-based error propagation and match-based enum dispatch, ensuring multi-step workflows unwind safely during partial failures.

How does a saga resume after a worker crash in Rust durable workflows?

A saga resumes after a worker crash because each forward step creates a durable checkpoint, allowing the Rust durable workflow to recover state and continue processing or execute compensating actions from the last successful checkpoint.

When do I need idempotent compensations for distributed transactions?

Idempotent compensations for distributed transactions are needed when reverse rollback actions might retry due to timeouts or transient failures, preventing duplicate state changes when unwinding steps like payment captures or inventory reservations.

What is the best way to handle inventory reservation, payment capture, and shipment creation in a Rust saga?

The best way to handle inventory reservation, payment capture, and shipment creation in a Rust saga is using manual catch-and-compensate control flow, orchestrating ordered durable forward steps and automatically reverting completed steps if a later step fails.

Does the Rust Resonate durable SDK support configurable timeouts and retries for saga compensation operations?

Yes, the Rust Resonate durable SDK supports configurable timeouts and retries for saga compensation operations, ensuring realistic order processing scenarios complete reliably or trigger idempotent compensating rollbacks.

How do I dispatch reverse compensations using enum-based match statements in Rust?

Dispatch reverse compensations using enum-based match statements in Rust by mapping each forward step Result outcome to its corresponding rollback action, directing the saga to unwind specific completed operations via manual catch-and-compensate control flow.