eclipse-vertx / eclipse-vertx/vert.x

Enable DNS Resolving via TCP in case of Timeout

Open
#5,676 11 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
14.7k
Forks
2.1k
Avg merge
2d 7h
Merged PRs (30d)
28

Description

Hi everyone,

I noticed that Vertx enables Netty DNS Resolving via TCP (see https://github.com/eclipse-vertx/vert.x/blob/4.5.17/src/main/java/io/vertx/core/impl/resolver/DnsResolverProvider.java#L108):
`builder.socketChannelFactory(() -> (SocketChannel) vertx.transport().channelFactory(false).newChannel());`

However, this sets "retryOnTimeout" to "false". It would be nice if Vertx would enable TCP resolving on timeouts - maybe just with some kind of environment variable for toggling, like this:

`builder.socketChannelFactory(() -> (SocketChannel) vertx.transport().channelFactory(false).newChannel(), Boolean.getBoolean("vertx.dns.retryOnTimeout"));`

I'm happy to provide a PR if you approve of this.

Best regards

### Contribution

Me

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.