Menu

Post image 1
Post image 2
Post image 3
Post image 4
1 / 4
0

Saga Compensation for a Payments Flow That Actually Unwinds

DEV Community·Gabriel Anhaia·about 1 month ago
#HDWMiV0a
Reading 0:00
15s threshold

Book: Event-Driven Architecture Pocket Guide Also by me: Database Playbook: Choosing the Right Store for Every System You Build My project: Hermes IDE | GitHub — an IDE for developers who ship with Claude Code and other AI coding tools Me: xgabriel.com | GitHub The card charged at 02:14 UTC. The shipping service threw a 502 at 02:14:03. By 02:14:09 your retry loop had charged the same card a second time and still produced zero shipped boxes. Customer support is now telling a person they were billed $148.50 for a product that does not exist in any warehouse system you own. That's a saga with no compensation discipline. The four steps reserve_inventory → charge_card → ship → notify look linear on a whiteboard and behave like a minefield in production: each one can fail, each one can succeed-but-time-out, and the retry that "fixes" step 3 can corrupt step 2 if step 2's compensation is not idempotent.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More