showuon commented on a change in pull request #11200: URL: https://github.com/apache/kafka/pull/11200#discussion_r687624316
########## File path: core/src/main/scala/kafka/server/KafkaConfig.scala ########## @@ -1905,6 +1905,13 @@ class KafkaConfig(val props: java.util.Map[_, _], doLog: Boolean, dynamicConfigO @nowarn("cat=deprecation") private def validateValues(): Unit = { + val nodeIdValue = values.get(KafkaConfig.NodeIdProp).asInstanceOf[Int] + if (nodeIdValue >= 0) { + val brokerIdValue = values.get(KafkaConfig.BrokerIdProp).asInstanceOf[Int] + if (brokerIdValue != Defaults.BrokerId && brokerIdValue != nodeIdValue) { + throw new ConfigException(s"The values for broker.id ($brokerIdValue) and node.id ($nodeIdValue) must be the same if both are specified") + } + } Review comment: Do you think we can put this check into below else block for KRaft-based metadata quorum case only? -- 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