Sequence — Async Saga
Asynchronous messaging with timeouts and compensating actions.
Rendering…
Make it your own.
@startuml
!theme plain
skinparam backgroundColor transparent
participant Client
participant API
queue Bus
participant Payment
participant Inventory
Client -> API : POST /order
API -> Bus : OrderCreated
Bus -> Payment : ChargeCommand
Bus -> Inventory : ReserveCommand
Payment --> Bus : PaymentCaptured
Inventory --> Bus : StockReserved
Bus -> API : SagaComplete
API --> Client : 201 Created
note right of Bus
If Payment fails:
Bus → Inventory : ReleaseStock
API → Client : 402
end note
@enduml