...
Client Behaviors Changes
Bootstrap upon first NetworkClient.poll() instead of in the constructor.
Bootstrapping is retriable.
KafkaConsumer: Users can retry bootstrapping via poll() if it fails. Each retry will be bounded by either the poll timer or the bootstrap timer, whichever expires first.
KafkaAdminClient: Bootstrap exception is thrown when user tries to materialize the result future. The retry is bounded by the API timeout.
KafkaProducer: Bootstrap will be done in the background thread. If the client has not been bootstrapped when the user attempts to send a message, it can wait up to the maximum block timer or until the bootstrap is complete, whichever expires first.
Exception Handling
Failed DNS resolution will result in NetworkExceptionThrows BootstrapConnectionException
Case Study
Every time the network client attempts to bootstrap and fails, a warning message will be logged. In this section, I outlined how clients can react to bootstrap failures. In particular, I want to cover two common cases:
...