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

FailureListener.onFailure should allow to handle the exception which cause failure #90081

Open
HonestManXin opened this issue Sep 15, 2022 · 2 comments
Labels
:Clients/Java Low Level REST Client Minimal dependencies Java Client for Elasticsearch >enhancement Team:Clients Meta label for clients team

Comments

@HonestManXin
Copy link

Description

In RestClient.performRequest if a exception happen when call CloseableHttpAsyncClient.execute, FailureListener.onFailure called with the node performRequest, then retry next node。

But for response time sensitive application, we don't want to retry for some exception(ie: socket timeout exception), so i think we should add a method for FailureListener.

public void onFailure(Node node, Exception e) throw Exception {}

Let the user decide retry or not

@HonestManXin HonestManXin added >enhancement needs:triage Requires assignment of a team area label labels Sep 15, 2022
@romseygeek romseygeek added :Clients/Java Low Level REST Client Minimal dependencies Java Client for Elasticsearch and removed needs:triage Requires assignment of a team area label labels Sep 15, 2022
@elasticsearchmachine elasticsearchmachine added the Team:Clients Meta label for clients team label Sep 15, 2022
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/clients-team (Team:Clients)

@aweiyo
Copy link

aweiyo commented Oct 8, 2023

I have the same request, is there any solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Clients/Java Low Level REST Client Minimal dependencies Java Client for Elasticsearch >enhancement Team:Clients Meta label for clients team
Projects
None yet
Development

No branches or pull requests

4 participants