Add jitter support to retry cooldown policies (#2501)#2504
Merged
jeremydmiller merged 1 commit intoJasperFx:mainfrom Apr 14, 2026
Merged
Add jitter support to retry cooldown policies (#2501)#2504jeremydmiller merged 1 commit intoJasperFx:mainfrom
jeremydmiller merged 1 commit intoJasperFx:mainfrom
Conversation
Introduces WithFullJitter, WithBoundedJitter, and WithExponentialJitter fluent methods on IAdditionalActions. Jitter adds randomness to retry delays so distributed nodes don't retry in lockstep after a shared downstream failure. Applies to RetryWithCooldown, ScheduleRetry, ScheduleRetryIndefinitely (including the infinite source), and PauseThenRequeue. The three strategies are mutually exclusive per error rule. Invariant: jitter only extends the configured delay, never shortens it. All strategies are additive: - Full: d + random(0, d) → [d, 2d] - Bounded: d + random(0, d * percent) → [d, d*(1+percent)] - Exponential: d + random(0, d * attempt * 2) → [d, d*(1+2*attempt)] Exponential is attempt-scaled and stateless — it deliberately avoids tracking the previous actual delay per envelope, keeping the envelope shape and persistence schema unchanged. Closes JasperFx#2501
Member
|
@BlackChepo Very cool, thank you! |
This was referenced Apr 15, 2026
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.
Closes #2501.
Summary
Adds additive jitter to Wolverine's delay-based error policies so distributed
nodes don't retry in lockstep after a shared downstream failure.
Three new fluent methods on
IAdditionalActions: