title: Reactor Retry: reactor.retry.Retry vs. reactor.util.retry.Retry
body: <p>First time I use retry pattern in reactor.</p>
  <p>I have got totally confused with the management of retrying in reactor. The main source of confusion is the existing 2 Retry classes in the same package!</p>
  <p>I want to retry a Mono/Flux process when specific exceptions happens, during a max number of times.</p>
  <p>My first step is create a <code>reactor.retry.Retry</code> in this way.</p>
  <pre><code>reactor.retry.Retry retry = reactor.retry.Retry
          .anyOf(
                  WebClientResponseException.BadRequest.class,
                  WebClientResponseException.BadGateway.class)
          .retryMax(nRetries);
  </code></pre>
  <p>And then, I want to parameterize my mono with</p>
  <pre><code>mymono.retryWhen(utilRetry);
  </code></pre>
  <p>Following the documentation in <a href="https://projectreactor.io/docs/extra/snapshot/api/reactor/retry/Retry.html" rel="nofollow noreferrer">Interface Retry</a> I have to convert the <code>reactor.retry.Retry</code> object in a <code>reactor.util.retry.Retry</code> using the method <code>withThrowable</code>, but there is no sample (and the sample in the doc doesn't work because the objects are not compatible).</p>
  <p>So, I'm looking for something like</p>
  <p>utilRetry=retry.<em>somemethod</em>()</p>
  <p>Any comment for newbie will be welcome!</p>
  <p>UPDATE:</p>
  <p>I have found this issue <a href="https://github.com/reactor/reactor-addons/issues/231" rel="nofollow noreferrer">reactor.retry.Retry does not provide methods for Mono.retryWhen(Retry retrySpec) #231</a> where it seems there is some migration conflics, but does not provide a canonical solution</p>