As it is mentioned in the Feign's documentation, by default, will automatically retry IOException
s.
We have some another retry
logic in our project and I want to prevent Feign's. Is there any easy way to disable it? Or should write my own retryer?
We are using Spring cloud's open feign library.
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
You will need to provide your own Retryer
if you wish to change the default retry behavior. It can be applied directly to the Feign.builder or by registering it as a Bean. Either way, you must implement the feign.Retryer
interface.