Medium Resilience Patterns
Retry with Backoff
Create a service that fails the first 2 times and succeeds on the 3rd. Use retryWhen with Retry.fixedDelay(2, Duration.ofMillis(100)) to retry with delay. Print the result.
retryWhen with Retry.fixedDelay adds a delay between retries.
Expected
Success on attempt 3
Main.kt