private void resolveAddresses() throws UnknownHostException {
            // (Re-)initialize list
            addresses = ClientUtils.resolve(host, hostResolver);
            if (log.isDebugEnabled()) {
                log.debug("Resolved host {} to addresses {}", host, addresses);
            }
            addressIndex = 0;

            // We re-resolve DNS after disconnecting, but we don't want to immediately reconnect to the address we
            // just disconnected from, in case we disconnected due to a problem with that IP (such as a load
            // balancer instance failure). Check the first address in the list and skip it if it was the last address
            // we tried and there are multiple addresses to choose from.
            if (addresses.size() > 1 && addresses.get(addressIndex).equals(lastAttemptedAddress)) {
                addressIndex++;
            }
        }
Jumps to the next available resolved address for this node. If no other addresses are available, marks the
list to be refreshed on the next {@link #currentAddress()} call.
clients/src/main/java/org/apache/kafka/clients/ClusterConnectionStates.java