dajac commented on code in PR #16945:
URL: https://github.com/apache/kafka/pull/16945#discussion_r1726460735
##########
core/src/main/scala/kafka/server/KafkaConfig.scala:
##########
@@ -577,23 +578,22 @@ class KafkaConfig private(doLog: Boolean, val props:
util.Map[_, _])
if (processRoles.isEmpty) {
throw new ConfigException(s"The new '${GroupType.CONSUMER}' rebalance
protocol is only supported in KRaft cluster.")
}
- warn(s"The new '${GroupType.CONSUMER}' rebalance protocol is enabled
along with the new group coordinator. " +
- "This is part of the preview of KIP-848 and MUST NOT be used in
production.")
+ if (!isNewGroupCoordinatorEnabled) {
+ throw new ConfigException(s"The new '${GroupType.CONSUMER}' rebalance
protocol is only supported by the new group coordinator.")
+ }
}
if (protocols.contains(GroupType.SHARE)) {
- // The CONSUMER protocol enables the new group coordinator, and that's a
prerequisite for share groups.
- if (!protocols.contains(GroupType.CONSUMER)) {
- throw new ConfigException(s"Enabling the new '${GroupType.SHARE}'
rebalance protocol requires '${GroupType.CONSUMER}' to be enabled also.")
+ if (processRoles.isEmpty) {
Review Comment:
This is a good question. For the context, `classic,consumer` will be the
default value in 4.0. This means that controllers will also get this setting.
If we restrict to the broker role, the controllers will fail to start. This is
why I used this check to basically verify that we are in kraft mode.
--
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]