aws_s3: add sqs.idle_poll_period to back off idle SQS polling#4479
Open
peczenyj wants to merge 8 commits into
Open
aws_s3: add sqs.idle_poll_period to back off idle SQS polling#4479peczenyj wants to merge 8 commits into
peczenyj wants to merge 8 commits into
Conversation
Adds an optional duration field plumbed through s3iSQSConfig and validated (non-negative) at parse time. Behavioural wiring follows in the next commit. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
When set (>0) the configured duration replaces the fixed 500ms throttle between empty SQS receives; the default 0s keeps the historical 500ms. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Extract the hardcoded 500ms empty-receive throttle into a named defaultIdleThrottle constant, and compute the idle wait as max(defaultIdleThrottle, idle_poll_period) so a configured value below 500ms is raised to the historical floor rather than polling SQS more aggressively than the previous default. Documents the clamp in the field description. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Fixes #4478
What
Adds an optional
sqs.idle_poll_periodduration field to theaws_s3input. When set (> 0) it replaces the fixed 500ms throttle applied after an empty SQSReceiveMessage; the default0skeeps current behaviour byte-for-byte.Why
On an idle queue the input polls on a 500ms throttle (or ~every 20s with
wait_time_seconds: 20). Deployments polling SQS from outside AWS (e.g. over a NAT gateway) want to back off further to cut request volume. The field stacks afterwait_time_secondslong-polling and trades first-message latency for fewer requests.Notes
0s).Popmakes a long idle period wake immediately on shutdown.Popback-off itself is not unit-tested: exercising it would require an SQS client interface seam that the input does not currently have (the pre-existing 500ms path is untested for the same reason).