ueisele commented on a change in pull request #10935:
URL: https://github.com/apache/kafka/pull/10935#discussion_r661744976



##########
File path: core/src/main/scala/kafka/server/BrokerServer.scala
##########
@@ -283,7 +283,7 @@ class BrokerServer(
         networkListeners.add(new Listener().
           setHost(if (Utils.isBlank(ep.host)) 
InetAddress.getLocalHost.getCanonicalHostName else ep.host).
           setName(ep.listenerName.value()).
-          setPort(socketServer.boundPort(ep.listenerName)).
+          setPort(ep.port).

Review comment:
       I added two tests to RaftClusterTest class. One for verifying that the 
configured advertised host and port are registered if the port is non zero. And 
another which in verifies that if the advertised port is 0, the bound port is 
used as actual advertised port. This is required to support binding the 
listener to any free port, which is used for example for the integration tests. 




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

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

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


Reply via email to