RivenSun created KAFKA-13786:
--------------------------------

             Summary: 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


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)

Reply via email to