spring-cloud-netflix icon indicating copy to clipboard operation
spring-cloud-netflix copied to clipboard

Fix selecting HTTP client builders for Eureka Client

Open OlgaMaciaszek opened this issue 1 year ago • 2 comments

Currently, if there's a builder bean for HTTP client (RestClient.Builder, WebClient.Builder, etc.) created by the user, it's used for creating the client used for communication with Eureka. The problem with this approach is that it's not readily visible for the users and we may end up using builder beans with a setup that was not intended by the users to be used for communicating with Eureka (for example, a @LoadBalanced RestClient.Builder). Consider switching to an approach where if there's a builder identified by the user for this specific purpose (for example, by a specific supplier function or interface), it's used, if not, we create our own and use available configurers/customisers on it to make sure the Boot-provided capabilities, such as metrics support are there.

See:

  • https://github.com/spring-cloud/spring-cloud-netflix/issues/4380#issuecomment-2511824203
  • https://github.com/spring-cloud/spring-cloud-netflix/issues/4255

OlgaMaciaszek avatar Dec 02 '24 16:12 OlgaMaciaszek

Hello, I’m interested in this issue. If no one has taken it yet, may I work on it?

hyunw9 avatar Sep 21 '25 13:09 hyunw9

Hold off for now. We need to do some design work as a team.

spencergibb avatar Sep 21 '25 14:09 spencergibb