title: Custom Retry strategy for Spring WebClient
body: <p>I'm using a fixedRetry in order to repeat HTTP calls using WebClient.
  I want the first retry to be called after 5 minutes, the second one after 30 minutes, and the rest after 60 minutes. Is there a way to do this using the fixedRetry? I checked <a href="https://www.baeldung.com/spring-webflux-retry" rel="nofollow noreferrer">https://www.baeldung.com/spring-webflux-retry</a> several times, but I haven't found a way to use 3 different values for the delay time.</p>
  <p>This how the constructor looks like:</p>
  <pre><code>public MyService(WebClient client,
              @Value(&quot;${retry.quantity}&quot;) int retries,
              @Value(&quot;${retry.time.first}&quot;) int firstTime,
              @Value(&quot;${retry.time.second}&quot;) int secondTime,
              @Value(&quot;${retry.time.rest}&quot;) int restTime) 
  {
          this.client = client;
          this.fixedRetry = Retry.anyOf(ResponseException.class)
                  .fixedBackoff(Duration.ofSeconds(restTime))
                  .retryMax(retries)
                  .doOnRetry(exception -&gt;
                      log.error(&quot;Exception on Retry is {} .&quot;, exception)
                  );
  }
  </code></pre>