Skip to content

Document the concurrency model for subscribers#2885

Open
00yhj22-debug wants to merge 1 commit into
ag2ai:mainfrom
00yhj22-debug:docs-concurrency-explanation
Open

Document the concurrency model for subscribers#2885
00yhj22-debug wants to merge 1 commit into
ag2ai:mainfrom
00yhj22-debug:docs-concurrency-explanation

Conversation

@00yhj22-debug

Copy link
Copy Markdown
Contributor

Description

Closes #2749.

Adds a dedicated docs page (docs/docs/en/getting-started/subscription/concurrency.md) that explains the two independent levers FastStream offers for concurrent processing — max_workers and RabbitMQ's prefetch_count — and clears up the specific confusion called out in the issue:

Does prefetch_count=10 mean ten messages are processed at the same time?
→ No. It means the broker may deliver up to ten before requiring acks; how many are processed in parallel is determined by max_workers.

The page covers:

  • What each setting does on its own.
  • How they combine (with a small table of the four common combinations).
  • A note that Kafka/Confluent have no prefetch_count and link to the existing "Concurrent processing" notes on the Kafka subscriber docs.
  • A note that Redis/NATS/MQTT only have max_workers.

Also wires the new page into docs/docs/navigation_template.txt after the existing "Dynamic Subscribers" entry.

Type of change

  • Documentation (typos, code examples, or any documentation updates)

Checklist

  • My code adheres to the style guidelines of this project
  • I have conducted a self-review of my own code
  • I have made the necessary changes to the documentation (this is the docs change)
  • My changes do not generate any new warnings
  • I have added tests to validate the effectiveness of my fix
  • Both new and existing unit tests pass successfully on my local environment

No tests added — the change is a new docs page plus a single-line nav entry.

Closes ag2ai#2749.

Add a dedicated docs page (`getting-started/subscription/concurrency.md`)
that walks through how `max_workers` and RabbitMQ's `prefetch_count`
control concurrency, how they combine, and what `prefetch_count=N`
actually means (broker-side flow control, not "N processed at once").

Cross-references the existing Kafka subscriber notes and links the new
page from the navigation template.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Concurrency under-the-hood explanation in Docs

1 participant