1

I'm trying to configure the Spring WebClient to retry on a specific exception. Specifically PrematureCloseException but Im not really sure the exception matters.

I know how set a retry policy when calling a method on the client but I would like to do it globally for any request that goes through the client.

I fell like I should be able to do it with an ExchangeFilterFunction but I not really familiar with this and cannot figure it out.

RaSedg
  • 111
  • 1
  • 10
  • You can try something similar to this – hyde007 Aug 18 '21 at 06:26
  • When I use retry() in an ExchangeFilterFunction, I get `org.springframework.web.reactive.function.client.WebClientRequestException: multiple subscribers not supported`. So this solution won't work. – dream brother Sep 21 '21 at 09:55

0 Answers0