repeatRandomBackoff

fun <T> Flux<T>.repeatRandomBackoff(    times: Long,     first: Duration,     max: Duration? = null,     doOnRepeat: (RepeatContext<T>) -> Unit? = null): Flux<T>

Extension to add a Flux.repeat variant to Flux that uses a randomized backoff, as enabled by reactor-extra's Repeat builder.

Author

Simon Baslé

Since

3.1.1

Parameters

times

the maximum number of retry attempts

first

the initial delay in retrying

max

the optional upper limit the delay can reach after subsequent backoffs

doOnRepeat

optional Consumer-like lambda that will receive a RepeatContext each time an attempt is made.


fun <T> Mono<T>.repeatRandomBackoff(    times: Long,     first: Duration,     max: Duration? = null,     doOnRepeat: (RepeatContext<T>) -> Unit? = null): Flux<T>

Extension to add a Mono.repeat variant to Mono that uses a randomized backoff, as enabled by reactor-extra's Repeat builder.

Author

Simon Baslé

Since

3.1.1

Parameters

times

the maximum number of retry attempts

first

the initial delay in retrying

max

the optional upper limit the delay can reach after subsequent backoffs

doOnRepeat

optional Consumer-like lambda that will receive a RepeatContext each time an attempt is made.