Easy Resilience Patterns
Timeout with Fallback
Traducción al español en progresoEl contenido detallado de esta lección aún se está traduciendo. Mientras tanto, se muestra en inglés.
Create a Mono that simulates a slow service by delaying 5 seconds. Apply a timeout of 1 second and provide a fallback value "Timeout fallback" using onErrorReturn. Subscribe and print.
Note: For Piston execution, simulate with Mono.delay and .timeout().
Esperado
Timeout fallback
Main.kt