Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do HttpExchange interfaces support exponential backoff and fallbacks? #33084

Closed
UditMishraMoodys opened this issue Jun 21, 2024 · 5 comments
Closed
Assignees
Labels
for: external-project Needs a fix in external project in: web Issues in web modules (web, webmvc, webflux, websocket) status: superseded An issue that has been superseded by another

Comments

@UditMishraMoodys
Copy link

UditMishraMoodys commented Jun 21, 2024

We were using OpenFeign in our project and it worked well. We have exponential retries configured and we also have fallbacks and fallback factories defined.

Recently, we stumbled upon Spring Cloud OpenFeign doc page which says that this is now feature complete and suggest migrating over to Spring Interface Clients instead.

I read the documentation of Spring Interface Clients but it does not clearly explain about -

  1. Fallbacks
  2. How can we achieve exponential retries
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jun 21, 2024
@jhoeller jhoeller added the in: web Issues in web modules (web, webmvc, webflux, websocket) label Jun 24, 2024
@poutsma poutsma changed the title Does RestClient support exponential backoff and fallbacks? Does RestClientAdapter support exponential backoff and fallbacks? Jun 24, 2024
@poutsma poutsma changed the title Does RestClientAdapter support exponential backoff and fallbacks? Does HttpExchange interfaces support exponential backoff and fallbacks? Jun 24, 2024
@poutsma poutsma changed the title Does HttpExchange interfaces support exponential backoff and fallbacks? Do HttpExchange interfaces support exponential backoff and fallbacks? Jun 24, 2024
@bclozel
Copy link
Member

bclozel commented Jun 26, 2024

I have discussed this with @OlgaMaciaszek and she will provide some feedback here. We'll then decide what to do about this issue.

@OlgaMaciaszek
Copy link
Contributor

Will get back on this here today or tomorrow.

@OlgaMaciaszek
Copy link
Contributor

Thanks @UditMishraMoodys. In order to make it work OOTB, additional integration with Spring Cloud CircuitBreaker will be needed that has not been implemented yet. This is something that will need to be addressed in Spring Cloud, since it'll require access to SC CircuitBreaker dependencies. I have created an issue for it in Spring Cloud Circuit Breaker: spring-cloud/spring-cloud-circuitbreaker#186.

@bclozel
Copy link
Member

bclozel commented Jun 27, 2024

Thanks Olga for the analysis. I'm closing this issue for now as superseded by the Circuit Breaker one. We can reopen this issue if something needs to be done in Framework to support this case.

@bclozel bclozel closed this as not planned Won't fix, can't repro, duplicate, stale Jun 27, 2024
@bclozel bclozel added status: superseded An issue that has been superseded by another for: external-project Needs a fix in external project and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Jun 27, 2024
@agebhar1
Copy link

agebhar1 commented Aug 4, 2024

Hi @UditMishraMoodys, you can use Spring Retry w/ HttpExchange see HttpExchangeTest.kt if the client is a Spring Bean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: external-project Needs a fix in external project in: web Issues in web modules (web, webmvc, webflux, websocket) status: superseded An issue that has been superseded by another
Projects
None yet
Development

No branches or pull requests

6 participants