ijuma commented on code in PR #18414:
URL: https://github.com/apache/kafka/pull/18414#discussion_r1913608955


##########
core/src/main/scala/kafka/server/KafkaConfig.scala:
##########
@@ -635,21 +635,9 @@ class KafkaConfig private(doLog: Boolean, val props: 
util.Map[_, _])
     if (nodeId != brokerId) {
       throw new ConfigException(s"You must set 
`${KRaftConfigs.NODE_ID_CONFIG}` to the same value as 
`${ServerConfigs.BROKER_ID_CONFIG}`.")
     }
-    if (requiresZookeeper) {
-      if (zkConnect == null) {
-        throw new ConfigException(s"Missing required configuration 
`${ZkConfigs.ZK_CONNECT_CONFIG}` which has no default value.")
-      }
-      if (brokerIdGenerationEnable) {
-        require(brokerId >= -1 && brokerId <= maxReservedBrokerId, "broker.id 
must be greater than or equal to -1 and not greater than 
reserved.broker.max.id")
-      } else {
-        require(brokerId >= 0, "broker.id must be greater than or equal to 0")
-      }
-    } else {
-      // KRaft-based metadata quorum
-      if (nodeId < 0) {
-        throw new ConfigException(s"Missing configuration 
`${KRaftConfigs.NODE_ID_CONFIG}` which is required " +
-          s"when `process.roles` is defined (i.e. when running in KRaft 
mode).")
-      }
+    if (nodeId < 0) {

Review Comment:
   Hmm, you can make this required too at the config definition level, right?



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