Describe the bug I am currently using SpringCloudOpenFeign with Fallback factory and Resillence4j Circuit Breaker and Resillience4j Retry We are seeing that the Spring fallback factory and fallback is invoked for before each retry attempt. We want the fallback to happen only once after all the resillence4j retry attempts How do we do this?

Below TestFallBackWithFactory is getting called before each of the resillence4j retry. How do stop it and call TestFallBackWithFactory only after retry attempts are meet. Please advise

Sample

@FeignClient(name = "test",
        url = baseURI",
        configuration = {ConfigTest.class},
        fallbackFactory = TestFallBackFactory.class)

public interface Test {
@RequestMapping(...)
ResponseEntity<Void> test (....)
}
@Component
class TestFallBackFactory implements FallbackFactory<> {
@Override
public TestFallBackWithFactory create() {
return new TestFallBackWithFactory(cause);
}

class TestWithFactory implements Test {
test() {}

}

Comment From: rajakumare1

Hi, Could anyone provide details how to configure fallback only after the retry attempts are completed in Spring Cloud Openfeign with resillence4j circuitbreaker/retry

Comment From: OlgaMaciaszek

Hello @rajakumare1, thanks for submitting the issue. Please learn how to properly format code and logs. Please provide a minimal, complete, verifiable example that reproduces the issue - as a link to a GH repo to a small executable app with all the required dependencies.

Comment From: spring-cloud-issues

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

Comment From: spring-cloud-issues

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.