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

Include HttpClient 5.X for the rest client #9718

Closed
AhmadMS1988 opened this issue Sep 3, 2023 · 2 comments
Closed

Include HttpClient 5.X for the rest client #9718

AhmadMS1988 opened this issue Sep 3, 2023 · 2 comments
Labels
Clients Clients within the Core repository such as High level Rest client and low level client enhancement Enhancement or improvement to existing feature or request untriaged

Comments

@AhmadMS1988
Copy link

I would like to see HttpClient 5.X included in the next release of the java client.
I has a great potential to solve this issue, and it is already merged in main here and here.
Is there anything preventing this from being included in the next version of the java client as it is one year old?
Thank you very much

@AhmadMS1988 AhmadMS1988 added enhancement Enhancement or improvement to existing feature or request untriaged labels Sep 3, 2023
@tlfeng tlfeng added the Clients Clients within the Core repository such as High level Rest client and low level client label Sep 5, 2023
@tlfeng
Copy link
Collaborator

tlfeng commented Sep 5, 2023

Hi @AhmadMS1988 Are you requesting to have HttpClient 5.x in next release of Java high-level REST client?
It is embedded in this repository and releases along with OpenSearch core. As your referred PR says, it is considered as a breaking change, so it can only be released along with next OpenSearch major version (3.0).
@reta Could you double check your code change 4833e08 of using HttpClient 5.x is a breaking change that can't be backported to 2.x branch?

I also noticed Java high-level REST client is deprecated, it's recommended switching to the Java client instead. The new "Java client" already have HttpClient 5.x in the code https://github.com/opensearch-project/opensearch-java/tree/v2.6.0/java-client/src/main/java/org/opensearch/client/transport/httpclient5 since version 2.2.0 .

@reta
Copy link
Collaborator

reta commented Sep 5, 2023

Thanks @tlfeng, @AhmadMS1988

Hi @AhmadMS1988 Are you requesting to have HttpClient 5.x in next release of Java high-level REST client?

The Apache HttpClient 5 based RestClient is part of the 3.0.0 release. However, if you switch to officially recommended opensearch-java client, you could benefit of Apache HttpClient 5 right now [1], as @tlfeng mentioned.

@reta Could you double check your code change 4833e08 of using HttpClient 5.x is a breaking change that can't be backported to 2.x branch?

Yes, sadly RestClient leaked Apache HttpClient 4.x APIs (like HttpHost etc) and this is a breaking change both from API and dependency perspectives.

[1] https://github.com/opensearch-project/opensearch-java/blob/2.x/USER_GUIDE.md#create-a-client-using-apachehttpclient5transport

@reta reta closed this as completed Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clients Clients within the Core repository such as High level Rest client and low level client enhancement Enhancement or improvement to existing feature or request untriaged
Projects
None yet
Development

No branches or pull requests

3 participants