[Feature] Azure Service Bus: no option for prefetch on subscriptions
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Start by reading ServiceBusReceiverProvider and AzureServiceBusSubscriptionConfiguration, then follow how the configuration reaches the receiver options. Done means the subscription configuration exposes PrefetchCount with a default of 0 and passes its value to the receiver options; check the relevant tests for default and configured values.
Written by the indexing model from the issue text.
Description
One thing I couldn't find on the ASB side is prefetch.
ServiceBusReceiverProvider now only sets ReceiveMode on the receivers, which leaves PrefetchCount at 0. BufferSize looks similar, but it's just the max count for a single ReceiveMessagesAsync call, and without prefetch each of those calls goes to the broker. Microsoft's prefetch page explains the difference better than I can, and even gives some tips on performance. (On RMQ bufferSize already becomes the channel prefetch through BasicQos.)
Describe the solution you'd like
Could AzureServiceBusSubscriptionConfiguration get a PrefetchCount, default 0, that's passed to the receiver options? On master it could go the same way MaxAutoLockRenewalDuration does.
I wouldn't tie it to bufferSize though. With peek lock the lock timer starts when a message lands in the prefetch buffer, and with a big buffer and slow handlers locks can run out before the handler even gets the message. Microsoft's rule of thumb is a lock longer than it takes to process the whole buffer plus one message. The renewal on master already skips messages with an expired lock in CanDispatchAsync, so at least those don't reach the handler.
Describe alternatives you've considered
You can get it today by subclassing ServiceBusClient (CreateReceiver and AcceptNextSessionAsync are virtual), setting PrefetchCount in there and returning that client from your own IServiceBusClientProvider. It works, but it hits every subscription using that provider, and a per-subscription setting would be nicer.
Prepared with help of an AI assistant.
- Dominant language
- C#
- Stars
- 2.5k
- Forks
- 301
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 87
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from BrighterCommand/Brighter
-
[Bug] Decompression leaves metadata that makes recompression throw and corrupt the content typePossibly taken @gabisonia claimed this today. Open.NET 2 - In Progress Bug V10.X
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
BrighterCommand/Brighter#4683 · 1 assignee ·
Maintainers usually reply within 1 day
-
[Bug] CloudEvents transformer double-encodes +json payloads as stringsPossibly taken @gabisonia claimed this today. Open.NET 2 - In Progress Bug V10.X
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
BrighterCommand/Brighter#4682 · 1 assignee ·
Maintainers usually reply within 1 day
-
[Bug] ParallelSplit reverses parent and child job relationshipsPossibly taken @iancooper claimed this today. Open1 - Up Next Workflows (Future Feature)
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
BrighterCommand/Brighter#4672 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
[Bug] InMemoryOutbox ignores pageNumber for dispatched and outstanding messagesPossibly taken @gabisonia claimed this today. Open.NET 2 - In Progress 3 - Done Bug V10.X
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
BrighterCommand/Brighter#4668 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
0 - Backlog Documentation V10.X
Difficulty 1/5 Under an hour Newbie friendliness 88/100
BrighterCommand/Brighter#4650 ·
Maintainers usually reply within 1 day
All issues in BrighterCommand/Brighter
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 76/100
GameShowLDA/AskMkiM#1075 ·
Maintainers usually reply within 1 day
-
kind/bug triage/untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
unoplatform/uno.resizetizer#414 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day