Metastarx opened a new issue, #11549:
URL: https://github.com/apache/rocketmq/issues/11549

   BrokerContainerProcessor.addBroker() accepts brokerConfig.listenPort without 
validating it at 
container/src/main/java/org/apache/rocketmq/container/BrokerContainerProcessor.java:118-126.
 When it is 0, InnerBrokerController.initializeRemotingServer() creates the 
main sub-server on port 0 and the fast sub-server on port -2 at lines 49-57. 
SubRemotingServer.start() normalizes negative ports to 0 and replaces port 0 
with an OS-assigned port at 
remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingServer.java:746-755,
 but InnerBrokerController.getBrokerAddr() still formats 
brokerConfig.getListenPort() at 
container/src/main/java/org/apache/rocketmq/container/InnerBrokerController.java:147-149.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to