AndrewJSchofield commented on code in PR #19542: URL: https://github.com/apache/kafka/pull/19542#discussion_r2064199957
########## core/src/main/scala/kafka/server/KafkaApis.scala: ########## @@ -3940,8 +3905,12 @@ class KafkaApis(val requestChannel: RequestChannel, .setCurrentLeader(partitionData.currentLeader) } + private def shareVersion(): ShareVersion = { + ShareVersion.fromFeatureLevel(metadataCache.features.finalizedFeatures.getOrDefault(ShareVersion.FEATURE_NAME, 0.toShort)) + } + private def isShareGroupProtocolEnabled: Boolean = { - config.shareGroupConfig.isShareGroupEnabled + config.shareGroupConfig.isShareGroupEnabled || shareVersion().supportsShareGroups Review Comment: In the tests, the non-production features are automatically enabled. As a result, tests generally do not need to enable the feature. However, if you make a broker outside the test infrastructure, it will not have share groups enabled. In the period of time that the feature is not enabled by default, having an internal config (group.share.enable) as a simple way to turn on share groups without using the feature is helpful. For situations in which creating a broker using config is automated or scripted, just adding `group.share.enable=true` to the config is very simple. The alternative using a feature is a bit more fiddly (either enable the feature when formatting the broker storage, or start the broker and then enable the feature with a second command) -- 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