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

refactor: remove dependency on apache http client #1582

Open
wants to merge 1 commit into
base: 2.x
Choose a base branch
from

Conversation

clutcher
Copy link

Removing dependency on apache http client verion 4 from eureka-client. Below is copied from #1581 :


As I see org.apache.httpcomponents:httpclient:4.5.3 is needed only for 3 classes - MonitoredConnectionManager, NamedConnectionPool and SSLSocketFactoryAdapter, which are not used anywhere else in the code. Also from what I see in implementation and current state of spring cloud netflix - it looks like eureka-client is now uses everywhere EurekaHttpClient interface and doesn't not need to provide http client implementation itself.


  • This 3 classes are not really used anywhere in source code and in any of related projects included Spring Cloud ecosystem (checked via search on github and google by full qualified class names).
  • httpclient 4 classes are not used anywhere in eureka-client except java doc in EurekaClientConfig
  • httpclient 4 classes are used in eureka-client-jersey3 in EurekaJersey3ClientImpl, but implementation are provided by transitive dependency on org.glassfish.jersey.connectors:jersey-apache-connector:3.0.5
  • httpclient 4 classes are also used in eureka-core tests in TestableHttpReplicationClient, but implementation are provided by transitive dependency on eureka-test-utils, which depends on eureka-core-jersey3, which depends on org.glassfish.jersey.connectors:jersey-apache-connector:3.0.5

Copy link
Contributor

@spencergibb spencergibb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While we don't use Apache http client 4 in spring cloud, I can't say what Netflix uses internally. Removing public classes outside a major release is not typically a good thing. Maybe deprecate the classes and make Apache http client 4 optional?

@clutcher
Copy link
Author

clutcher commented Mar 25, 2025

@spencergibb Not sure how to make it optional in gradle, but I can work on it. Should I get confirmation from someone else if current PR should be remade to make http client 4 optional or we can go with removal?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants