Skip to content

KAFKA-19740: Deprecate group.coordinator.rebalance.protocols config (KIP-1237)#21522

Merged
chia7712 merged 12 commits intoapache:trunkfrom
mingyen066:KAFKA-19740-deprecate-rebalance-protocols-config
Mar 10, 2026
Merged

KAFKA-19740: Deprecate group.coordinator.rebalance.protocols config (KIP-1237)#21522
chia7712 merged 12 commits intoapache:trunkfrom
mingyen066:KAFKA-19740-deprecate-rebalance-protocols-config

Conversation

@mingyen066
Copy link
Collaborator

@mingyen066 mingyen066 commented Feb 20, 2026

Implement KIP-1237.

  • Deprecate the group.coordinator.rebalance.protocols configuration
    for removal in Kafka 5.0.
  • Log a deprecation warning when users disable any default protocol
    (classic, consumer, streams), advising them to remove the configuration
  • Guard warnings with doLog to avoid duplicate output during startup
  • Clean up redundant group.coordinator.rebalance.protocols settings in
    test files — "classic,consumer,streams" is already the default, and
    share is a no-op (controlled by share.version feature)

Test result:

# group.coordinator.rebalance.protocols=classic,consumer,streams
WARN The config `group.coordinator.rebalance.protocols` is deprecated
and will be removed in Kafka 5.0. Please remove the configuration to
prepare for the upgrade. (kafka.server.KafkaConfig)

# =classic,consumer
WARN The config `group.coordinator.rebalance.protocols` is deprecated
and will be removed in Kafka 5.0. The following protocol(s) are
currently disabled: streams. In Kafka 5.0, all protocols will always be
enabled and controlled solely by feature versions (group.version,
streams.version, share.version) via kafka-features.sh. Please remove the
configuration, which will restore all protocols to the default enabled
state, to prepare for the upgrade. (kafka.server.KafkaConfig)

# =classic,streams
WARN The config `group.coordinator.rebalance.protocols` is deprecated
and will be removed in Kafka 5.0. The following protocol(s) are
currently disabled: consumer. In Kafka 5.0, all protocols will always be
enabled and controlled solely by feature versions (group.version,
streams.version, share.version) via kafka-features.sh. Please remove the
configuration, which will restore all protocols to the default enabled
state, to prepare for the upgrade. (kafka.server.KafkaConfig)

# =classic
WARN The config `group.coordinator.rebalance.protocols` is deprecated
and will be removed in Kafka 5.0. The following protocol(s) are
currently disabled: consumer, streams. In Kafka 5.0, all protocols will
always be enabled and controlled solely by feature versions
(group.version, streams.version, share.version) via kafka-features.sh.
Please remove the configuration, which will restore all protocols to the
default enabled state, to prepare for the upgrade.
(kafka.server.KafkaConfig)

# =classic,consumer,streams,share
WARN 'share' in `group.coordinator.rebalance.protocols` is deprecated.
Share groups are controlled by the 'share.version' feature. This config
will be removed in Kafka 5.0. (kafka.server.KafkaConfig)
WARN The config `group.coordinator.rebalance.protocols` is deprecated
and will be removed in Kafka 5.0. Please remove the configuration to
prepare for the upgrade. (kafka.server.KafkaConfig)

# =classic,consumer,share
WARN 'share' in `group.coordinator.rebalance.protocols` is deprecated.
Share groups are controlled by the 'share.version' feature. This config
will be removed in Kafka 5.0. (kafka.server.KafkaConfig)
WARN The config `group.coordinator.rebalance.protocols` is deprecated
and will be removed in Kafka 5.0. The following protocol(s) are
currently disabled: streams. In Kafka 5.0, all protocols will always be
enabled and controlled solely by feature versions (group.version,
streams.version, share.version) via kafka-features.sh. Please remove the
configuration, which will restore all protocols to the default enabled
state, to prepare for the upgrade. (kafka.server.KafkaConfig)

# =consumer
ERROR Exiting Kafka due to fatal exception (kafka.Kafka$)
org.apache.kafka.common.config.ConfigException: Disabling the 'classic'
protocol is not supported.

Reviewers: Sean Quah squah@confluent.io, Chia-Ping Tsai
chia7712@gmail.com

…KIP-1237)

Mark the group.coordinator.rebalance.protocols configuration as deprecated
for removal in Kafka 5.0. When users set a value that disables any default
protocol, a warning is logged advising them to restore the default or remove
the configuration. The share protocol no-op warning is also preserved.
@github-actions github-actions bot added triage PRs from the community core Kafka Broker group-coordinator small Small PRs labels Feb 20, 2026
@dajac
Copy link
Member

dajac commented Feb 22, 2026

cc @squah-confluent

@chia7712
Copy link
Member

> Task :clients:clients-integration-tests:compileTestJava
/home/chia7712/project/kafka/clients/clients-integration-tests/src/test/java/org/apache/kafka/clients/consumer/ShareConsumerRackAwareTest.java:52: warning: [removal] GROUP_COORDINATOR_REBALANCE_PROTOCOLS_CONFIG in GroupCoordinatorConfig has been deprecated and marked for removal
            @ClusterConfigProperty(key = GroupCoordinatorConfig.GROUP_COORDINATOR_REBALANCE_PROTOCOLS_CONFIG, value = "classic, share"),
                                                               ^
1 warning

> Task :tools:compileTestJava
/home/chia7712/project/kafka/tools/src/test/java/org/apache/kafka/tools/GroupsCommandTest.java:469: warning: [removal] GROUP_COORDINATOR_REBALANCE_PROTOCOLS_CONFIG in GroupCoordinatorConfig has been deprecated and marked for removal
            @ClusterConfigProperty(key = GroupCoordinatorConfig.GROUP_COORDINATOR_REBALANCE_PROTOCOLS_CONFIG, value = "classic,consumer,streams"),
                                                               ^
/home/chia7712/project/kafka/tools/src/test/java/org/apache/kafka/tools/streams/DescribeStreamsGroupTest.java:80: warning: [removal] GROUP_COORDINATOR_REBALANCE_PROTOCOLS_CONFIG in GroupCoordinatorConfig has been deprecated and marked for removal
        props.setProperty(GroupCoordinatorConfig.GROUP_COORDINATOR_REBALANCE_PROTOCOLS_CONFIG, "classic,consumer,streams");
                                                ^
/home/chia7712/project/kafka/tools/src/test/java/org/apache/kafka/tools/streams/ListStreamsGroupTest.java:75: warning: [removal] GROUP_COORDINATOR_REBALANCE_PROTOCOLS_CONFIG in GroupCoordinatorConfig has been deprecated and marked for removal
        props.setProperty(GroupCoordinatorConfig.GROUP_COORDINATOR_REBALANCE_PROTOCOLS_CONFIG, "classic,consumer,streams");
                                                ^
3 warnings

@mingyen066 please fix the build warnings

Copy link
Contributor

@squah-confluent squah-confluent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the patch!

@github-actions github-actions bot removed the triage PRs from the community label Feb 23, 2026
@chia7712
Copy link
Member

@mingyen066 please fix the conflicts

@chia7712
Copy link
Member

chia7712 commented Mar 5, 2026

@mingyen066 please cleanup the following files as well

@ClusterConfigProperty(key = "group.coordinator.rebalance.protocols", value = "classic,consumer,share"),

new ClusterConfigProperty(key = "group.coordinator.rebalance.protocols", value = "classic,consumer,streams"),

@chia7712
Copy link
Member

chia7712 commented Mar 5, 2026

testAsyncConsumerWithConsumerProtocolDisabled should probably use group.version instead of group.coordinator.rebalance.protocols, but we can handle that in a follow-up

@github-actions github-actions bot removed the small Small PRs label Mar 6, 2026
@mingyen066 mingyen066 force-pushed the KAFKA-19740-deprecate-rebalance-protocols-config branch from 9539bc2 to 13397fd Compare March 9, 2026 03:58
@github-actions github-actions bot added the small Small PRs label Mar 9, 2026
@github-actions github-actions bot removed the small Small PRs label Mar 9, 2026
@mingyen066
Copy link
Collaborator Author

Sorry for the accidental force push, no change, just to re-trigger CI.

@github-actions github-actions bot added the small Small PRs label Mar 9, 2026
@chia7712 chia7712 merged commit 5e33fe7 into apache:trunk Mar 10, 2026
23 checks passed
@chia7712
Copy link
Member

Ugh, looks like there's still one test using classic,consumer,streams

new ClusterConfigProperty(key = GroupCoordinatorConfig.GROUP_COORDINATOR_REBALANCE_PROTOCOLS_CONFIG, value = "classic,consumer,streams"),

we'll file a minor patch

@m1a2st
Copy link
Collaborator

m1a2st commented Mar 10, 2026

The fix patch #21699

frankvicky pushed a commit that referenced this pull request Mar 11, 2026
#21699)

Cleanup test which using `classic,consumer,streams`, see comment
#21522 (comment)

Reviewers: TengYao Chi <frankvicky@apache.org>, Lan Ding
<isDing_L@163.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants