Thanks for the KIP, Philip! I think your proposal makes sense. I suspect the reason that we previously did the DNS resolution in the constructor is to fail fast if the name is wrong. On the other hand, it's generally a hassle to do failure-prone or slow operations in a constructor, so I'm in favor of moving it to poll.
I'm also in favor of throwing NetworkException (or some other RetriableException), since failing to resolve the DNS entry for the brokers shouldn't poison the state of the client, and it should be fine for users to retry if they want to. I actually do think there might be some overlap with KIP-899. If we go ahead and move DNS resolution to poll, then KIP-899 becomes just a question of whether we should call poll at other points after the first resolution. It seems like these could potentially be merged into one proposal, or you and Ivan could coordinate on symbiotic KIPs. Thanks again, -John On 2023/02/23 17:29:23 Philip Nee wrote: > Hi all! > > I want to start a discussion thread about how we can handle client > bootstrap failure due DNS lookup. This requires a bit of behavioral > change, so a KIP is proposed and attached to this email. Let me know what > you think! > > > *A small remark here*: *As the title of this KIP might sound > familiar/similar to KIP-899, it is not the same.* > > *In Summary:* I want to propose a KIP to change the existing bootstrap > (upon instantiation) strategy because it is reasonable to allow clients to > retry > > *KIP: * > https://cwiki.apache.org/confluence/display/KAFKA/KIP-909%3A+Allow+Clients+to+Rebootstrap+Upon+Failed+DNS+Resolution > > Thanks! > Philip >