Skip to content

Conversation

@MrSmoke
Copy link
Member

@MrSmoke MrSmoke commented Jul 28, 2025

The fix in #290 is not quite right.

PrefetchCount != ConsumerDispatchConcurrency. Prefetch count is how many messages to receive before you need to ack to get more. ConsumerDispatchConcurrency is how many threads to run the messages on.

If we set ConsumerDispatchConcurrency to PrefetchCount and prefetch count is large (ie when doing batches) then you'll be creating way too many threads.

Instead, pass ConsumerDispatchConcurrency in SubscribeOptions and use this to control concurrency and not the PrefetchCount

Revert changes from #294 and instead pass ConsumerDispatchConcurrency in SubscribeOptions. Use this to control concurrency and not the prefetch count otherwise that will create way too many tasks in the batch handler
@MrSmoke MrSmoke requested a review from happymancoder July 28, 2025 23:29
@happymancoder happymancoder merged commit 9b4440c into master Aug 3, 2025
5 checks passed
@happymancoder happymancoder deleted the better-fix-queue-hosted-service branch August 3, 2025 09:43
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.

3 participants