I am trying to understand the the default multiplier for exponential backoff strategy for Spring WebClient Retry.backoff method. And can this be configured? I cannot find documentation for this.
Version: reactor-netty 0.9.12.RELEASE
The utility method Retry.backoff
, as you said correctly, creates an exponential backoff strategy. The multiplier is 2. In other words, the backoff period doubles in length on each retry/failure.
You can see this in action in reactor.util.retry.RetryBackoffSpec#generateCompanion.
The "multiplier", as you can see, is hardcoded and is therefore not configurable out-the-box. In order to use something other than 2
you would create your own Retry
implementation and specifically implement the generateCompanion()
method to do logic as is done in RetryBackoffSpec
but using your own custom multiplier.