Description
LoginManager loginManager = loginManagers.get(clientSaslMechanism); authenticatorCreator = () -> buildClientAuthenticator(configs, saslCallbackHandlers.get(clientSaslMechanism), id, socket.getInetAddress().getHostName(), loginManager.serviceName(), transportLayer, subjects.get(clientSaslMechanism));
When using SASL authentication, kafka will always try to do hostname resolution when build client authenticator, this is unnecessary, if we use ip to connect to kafka server, and didn't config kafka server hostname resolution, kafka client will suck here for about 10s, and then timeout with java.net.UnknownHostException but client can auth success anyway.