Handle ASB queue-length management throttling (disable retries)#5605
Draft
ramonsmits wants to merge 1 commit into
Draft
Handle ASB queue-length management throttling (disable retries)#5605ramonsmits wants to merge 1 commit into
ramonsmits wants to merge 1 commit into
Conversation
…tling Azure Service Bus throttles management operations (GetQueuesRuntimeProperties) used to read queue lengths. By default the client retries the HTTP 429 responses internally and usually succeeds, so the throttling never surfaced as an exception and was invisible in the logs while still showing on the namespace dashboard. Disable the internal retries for the queue-length management client so a throttled query fails fast and throws ServiceBusException(ServiceBusy). The polling loop catches that and reactively backs off the query interval (exponential up to 1 min, recovering gradually) and logs a warning once per throttling episode, until the throttling clears. Disabling retries also removes the per-request retry amplification (each 429 retried up to 3x).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Disables the management client's internal retries so throttling (429) surfaces as a ServiceBusException instead of being silently retried away, then reactively backs off the queue-length query interval, logging a warning once per throttling episode.
One of two alternative approaches for the same issue; the other (#5604) detects throttling via an HTTP pipeline policy.