wenbingshen commented on a change in pull request #10575:
URL: https://github.com/apache/kafka/pull/10575#discussion_r617379329



##########
File path: core/src/main/scala/kafka/server/BrokerServer.scala
##########
@@ -272,7 +273,7 @@ class BrokerServer(
       val networkListeners = new ListenerCollection()
       config.advertisedListeners.foreach { ep =>
         networkListeners.add(new Listener().
-          setHost(ep.host).
+          setHost(if (ep.host == null || ep.host.trim.isEmpty) 
InetAddress.getLocalHost.getCanonicalHostName else ep.host).

Review comment:
       Good idea.Thank you for your guidance and submit your feedback. :)




-- 
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to