johanhaleby / occurrent

Unintrusive Event Sourcing Library for the JVM
https://occurrent.org
120 stars 16 forks source link

Add context to RetryStrategy #134

Closed johanhaleby closed 1 year ago

johanhaleby commented 1 year ago

For example:

retry.execute(ctx -> ..);

ctx should include e.g. isLastAttempt, numberOfAttempts, numberOfAttemptsLeft, currentBackoffTime, nextBackoffTime, elapsedTime, and the ability to set state in the context (should it be immutable?).