Add ability to configure underlying HttpClient in spring boot · Issue #690 · PlaytikaOSS/feign-reactive · GitHub
Skip to content

Add ability to configure underlying HttpClient in spring boot #690

Open

Description

@pgrzywa90

I have a Spring Boot application that uses the library (thanks for all hard work here!) to create non-blocking HTTP clients.

I want to customize the underlying Netty HttpClient used by Feign to change the NameResolverProvider configuration so that DNS resolution retries with TCP when UDP fails.

This is possible in pure Netty using the following configuration (as suggested in this issue):

HttpClient.create()
    .resolver(spec -> spec.retryTcpOnTimeout(true));

This is important in our environment because we sometimes hit DNS resolution failures over UDP, and need the fallback to TCP for reliability.

I haven't found an easy way to achieve it - HttpClient is created in NettyClientHttpConnectorBuilder.buildNettyClientHttpConnector, and there is no callback or customization logic there. The code of WebReactiveFeign.Builder allows to set custom HttpClient, but I didn't find a way to do this.

Activity

  1. changed the title [-]Add ability to configure HttpClient in spring boot[/-] [+]Add ability to configure underlying HttpClient in spring boot[/+] on Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions