Skip to content

Add adaptive idle polling and exception backoff with jitter#10

Merged
lesnik512 merged 1 commit into
mainfrom
p5-p7-adaptive-polling-backoff
May 3, 2026
Merged

Add adaptive idle polling and exception backoff with jitter#10
lesnik512 merged 1 commit into
mainfrom
p5-p7-adaptive-polling-backoff

Conversation

@lesnik512
Copy link
Copy Markdown
Member

  • Per-subscriber max_polling_interval (default 5s) caps the idle backoff
  • _consume doubles sleep on consecutive empty cycles, ±50% jitter, resets on first hit
  • Exception sleep replaced with 1/2/4/8/16/30s backoff plus jitter, resets on success
  • _get_msgs returns count fetched or -1 for back-pressure (limiter saturated)

- Per-subscriber max_polling_interval (default 5s) caps the idle backoff
- _consume doubles sleep on consecutive empty cycles, ±50% jitter, resets on first hit
- Exception sleep replaced with 1/2/4/8/16/30s backoff plus jitter, resets on success
- _get_msgs returns count fetched or -1 for back-pressure (limiter saturated)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@lesnik512 lesnik512 self-assigned this May 3, 2026
@lesnik512 lesnik512 merged commit 324c8fa into main May 3, 2026
2 checks passed
@lesnik512 lesnik512 deleted the p5-p7-adaptive-polling-backoff branch May 3, 2026 13:51
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.

1 participant