Skip to content

Conversation

@lukebakken
Copy link
Contributor

When an AddressResolver is configured, the client still attempts DNS lookups for advertised broker hostnames from metadata responses. This causes 10-second timeouts per connection before falling back to the resolver.

This change introduces BrokerLeaderWithResolver and BrokerForConsumerWithResolver methods that check for an AddressResolver before attempting DNS lookup. When a resolver exists, these methods use the resolver's host and port directly, bypassing DNS resolution entirely.

The original BrokerLeader and BrokerForConsumer methods remain unchanged for backward compatibility and delegate to the new methods with a nil resolver parameter.

When an `AddressResolver` is configured, the client still attempts DNS
lookups for advertised broker hostnames from metadata responses. This
causes 10-second timeouts per connection before falling back to the
resolver.

This change introduces `BrokerLeaderWithResolver` and
`BrokerForConsumerWithResolver` methods that check for an `AddressResolver`
before attempting DNS lookup. When a resolver exists, these methods use
the resolver's host and port directly, bypassing DNS resolution entirely.

The original `BrokerLeader` and `BrokerForConsumer` methods remain unchanged
for backward compatibility and delegate to the new methods with a `nil`
resolver parameter.
@lukebakken lukebakken marked this pull request as ready for review November 21, 2025 21:12
@lukebakken lukebakken marked this pull request as draft November 21, 2025 21:39
@lukebakken lukebakken closed this Nov 21, 2025
@lukebakken lukebakken deleted the lukebakken/dns-timeout-addressresolver branch November 21, 2025 22:43
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.

1 participant