I am looking for a way to increase the duration of the timeout after successive retries on webclient calls.
For example, I want the first request to timeout after 50ms, the first retry will then timeout after 500ms, and a second and final retry to have a timeout duration of 5000ms.
I am not sure how to go about doing this. I am only aware of how to set the timeout value to a fixed duration for all retries.
ex.
public Flux<Employee> findAll()
{
return webClient.get()
.uri("/employees")
.retrieve()
.bodyToFlux(Employee.class)
.timeout(Duration.ofMillis(50))
.retry(2);
}