Skip to content

Add Flow.recoverWithRetry operator and Schedule class#281

Open
endrju19 wants to merge 1 commit intomainfrom
feature/recover-with-retry
Open

Add Flow.recoverWithRetry operator and Schedule class#281
endrju19 wants to merge 1 commit intomainfrom
feature/recover-with-retry

Conversation

@endrju19
Copy link
Contributor

  • recoverWithRetry(schedule, pf) — retries the recovery flow according to a Schedule when upstream fails
  • Schedule — new class with three factories (immediate, fixedInterval, exponentialBackoff) and two modifiers (maxRetries, maxInterval)
  • recoverWith refactored to delegate to recoverWithRetry with zero retries, eliminating code duplication

8 tests (2 recoverWithRetry + 6 Schedule).

@endrju19 endrju19 force-pushed the feature/recover-with-retry branch from 82f0cdb to 03bbc37 Compare March 12, 2026 14:48
@endrju19 endrju19 changed the base branch from feature/expand-extrapolate-pr to main March 12, 2026 14:48
@endrju19 endrju19 force-pushed the feature/recover-with-retry branch from 7f669a3 to 03bbc37 Compare March 12, 2026 15:08
@adamw
Copy link
Member

adamw commented Mar 12, 2026

Hm we don't have retry in jox (there's resilience4j that covers this quite well) so probably this shouldn't go in. But maybe an integration layer betwen jox and resilience4j would? Could we come up with some other flow-related or channel-related operations that might be useful here?

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.

2 participants