Skip to content

Add Scatter-Gather pattern and concurrency guidance to saga docs - #2427

Merged
jeremydmiller merged 1 commit into
mainfrom
2414-scatter-gather-saga-docs
Apr 3, 2026
Merged

jeremydmiller merged 1 commit into
mainfrom
2414-scatter-gather-saga-docs

Conversation

@jeremydmiller

Copy link
Copy Markdown
Member

Summary

Closes #2414

Adds two new sections to the existing saga documentation (docs/guide/durability/sagas.md):

Scatter-Gather Pattern

  • Explains the fan-out/fan-in messaging pattern and how it maps naturally to Wolverine sagas
  • Price comparison example — complete saga that fans out RequestSupplierQuote messages to multiple suppliers, collects SupplierQuoteResponse results, and emits AllQuotesCollected when done (or on timeout)
  • Uses OutgoingMessages for fan-out, TimeoutMessage for safety net, and null returns for "still waiting"
  • Variations: fire-and-forget scatter, partial/intermediate results
  • Links to Multi Step Workflows with the Critter Stack blog post

Saga Concurrency

  • Explains why concurrent saga messages cause lost updates (especially in scatter-gather)
  • Optimistic concurrency with IRevisioned and ConcurrencyException retry policies
  • Partitioned sequential messaging via UseInferredMessageGrouping() — recommended default for scatter-gather sagas
  • Combining strategies — partitioned messaging for local ordering + optimistic concurrency as multi-node safety net
  • Links to Dealing with Concurrency tutorial and Partitioned Sequential Messaging guide

Test plan

  • Verify the new sections render correctly in VitePress
  • Review code examples for accuracy

🤖 Generated with Claude Code

Documents the Scatter-Gather (fan-out/fan-in) messaging pattern using
Wolverine sagas with a price comparison example, timeout handling,
and variations. Adds saga concurrency section covering optimistic
concurrency with IRevisioned, partitioned sequential messaging, and
combining both strategies for multi-node deployments.

Closes #2414

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jeremydmiller
jeremydmiller merged commit 6b52410 into main Apr 3, 2026
17 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs: Scatter-Gather pattern tutorial using Sagas

1 participant