[ https://issues.apache.org/jira/browse/KAFKA-13786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17515205#comment-17515205 ]
RivenSun commented on KAFKA-13786: ---------------------------------- Hi [~showuon] You can browse the modification history of the *ControllerChannelManager.addNewBroker* method, or directly browse the changes to this method in PR-5921. The `control.plane.listener.name` parameter has two functions. 1. For a common broker, `control.plane.listener.name` determines whether the common brokers will create a ControlPlaneAcceptorAndProcessor separately, which is dedicated to the controllerBroker to establish a connection. 2. For the controllerBroker, `control.plane.listener.name` determines which listenerName the controllerBroker selects to connect to other common brokers. Before the `control.plane.listener.name` parameter was introduced, the controllerBroker connected to other brokers {*}through interBrokerListenerName{*}. In the latest code, if the value of `control.plane.listener.name` is not set, the value of *interBrokerListenerName will still be used* to connect to other brokers. Thanks. > Optimized documentation for control.plane.listener.name parameter > ----------------------------------------------------------------- > > Key: KAFKA-13786 > URL: https://issues.apache.org/jira/browse/KAFKA-13786 > Project: Kafka > Issue Type: Improvement > Components: config > Reporter: RivenSun > Priority: Major > > documentation: > [https://kafka.apache.org/documentation/#brokerconfigs_control.plane.listener.name] > There are two points in the above document that are not clear. > 1. There is a piece of verification code in KafkaConfig > {code:java} > // validate control.plane.listener.name config > if (controlPlaneListenerName.isDefined) { > require(advertisedListenerNames.contains(controlPlaneListenerName.get), > s"${KafkaConfig.ControlPlaneListenerNameProp} must be a listener name > defined in ${KafkaConfig.AdvertisedListenersProp}. " + > s"The valid options based on currently configured listeners are > ${advertisedListenerNames.map(_.value).mkString(",")}") > // controlPlaneListenerName should be different from interBrokerListenerName > > require(!controlPlaneListenerName.get.value().equals(interBrokerListenerName.value()), > s"${KafkaConfig.ControlPlaneListenerNameProp}, when defined, should have > a different value from the inter broker listener name. " + > s"Currently they both have the value ${controlPlaneListenerName.get}") > } {code} > `control.plane.listener.name` if set value, it cannot have the same value as > `inter.broker.listener.name`. > > 2. In the ControllerChannelManager.addNewBroker() method, there is a line of > code > {code:java} > val controllerToBrokerListenerName = > config.controlPlaneListenerName.getOrElse(config.interBrokerListenerName) > {code} > So the last sentence of the parameter document is wrong. > {code:java} > If not explicitly configured, the default value will be null and there will > be no dedicated endpoints for controller connections. {code} > > Solution: > Change the wrong document mentioned above to the following: > If not explicitly configured, the default value is null and the value of > `inter.broker.listener.name` will be used for controller connections. > If set explicitly, the value cannot be the same as the value of > `inter.broker.listener.name` -- This message was sent by Atlassian Jira (v8.20.1#820001)