frankvicky opened a new pull request, #23176:
URL: https://github.com/apache/kafka/pull/23176
JIRA: KAFKA-20939
KIP-909 changed DNS bootstrap resolution from synchronous (in the client
constructor) to asynchronous (deferred to the first `poll()`). This introduced
a silent breaking change: callers that previously relied on "constructor throws
=> no instance created" would now receive a permanently-broken client instance
that raises `BootstrapResolutionException` from every subsequent API call,
requiring new error-handling paths and an explicit close-and-recreate cycle.
Reuse the existing `bootstrap.resolve.timeout.ms` config to make the mode
selectable:
* `= 0` (new default) — resolve DNS synchronously in the constructor,
surface any failure as `ConfigException` (wrapped in `KafkaException` by the
constructor's outer try/catch); no client instance is created.
* `> 0` — resolve DNS asynchronously; failures surface as
`BootstrapResolutionException` from subsequent API calls, after which
the client must be closed and re-created.
This preserves the pre-KIP-909 behavior for every user who does not
explicitly opt in to the async model, while keeping the async model available
for those who need it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]