Skip to content

KAFKA-20300: Add broker configs for assignment batching and offload#21730

Merged
dajac merged 2 commits intoapache:trunkfrom
confluentinc:squah-kip-1263-add-configs-broker
Mar 13, 2026
Merged

KAFKA-20300: Add broker configs for assignment batching and offload#21730
dajac merged 2 commits intoapache:trunkfrom
confluentinc:squah-kip-1263-add-configs-broker

Conversation

@squah-confluent
Copy link
Contributor

@squah-confluent squah-confluent commented Mar 12, 2026

Add group.{consumer,share,streams}.assignment.interval.ms config options
to control the delay between assignment calculation. These config
options are dynamic at the broker level.

Add group.{consumer,share,streams}.{min,max}.assignment.interval.ms
config options to limit the
group.{consumer,share,streams}.assignment.interval.ms config values.

Add group.{consumer,share,streams}.assignor.offload.enable config
options to control whether assignment calculation is offloaded to a
group coordinator background thread. These config options are dynamic at
the broker level.

Reviewers: David Jacot djacot@confluent.io

…load

Add group.{consumer,share,streams}.assignment.interval.ms config options
to control the delay between assignment calculation. These config
options are dynamic at the broker level.

Add group.{consumer,share,streams}.{min,max}.assignment.interval.ms
config options to limit the
group.{consumer,share,streams}.assignment.interval.ms config values.

Add group.{consumer,share,streams}.assignor.offload.enable config
options to control whether assignment calculation is offloaded to a
group coordinator background thread. These config options are dynamic at
the broker level.
newProps ++= staticBrokerConfigs
overrideProps(newProps, dynamicDefaultConfigs)
overrideProps(newProps, dynamicBrokerConfigs)
GroupCoordinatorConfig.clampDynamicConfigs(newProps.asJava)
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need this change here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's analogous to the group config clamping in KIP-1240. Without it, all broker-level dynamic configs will not be applied when a broker is starting and the dynamic assignment.interval.ms is now outside of the allowed range.

Copy link
Member

Choose a reason for hiding this comment

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

I see... Thanks for clarifying. I don't really like having this here though. Have you considered alternative approaches?

Copy link
Member

Choose a reason for hiding this comment

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

At minimum, I think that we should have a clampDynamicConfigs methods in KafkaConfig so we avoid the coupling with GroupCoordinatorConfig here. It would also give a hit to folks adding configs to KafkaConfig.

I was also considering whether we should just introduce a new argument to the KafkaConfig, say clampDynamicConfigs. I am not sure whether it is better.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Defining KafkaConfig.clampDynamicConfigs makes sense.

And then we can either call it here or in the KafkaConfig constructor. If it's the latter we have to thread through an extra bool through processReconfiguration. Both threading the bool vs not threading are about the same for me.

@dajac
Copy link
Member

dajac commented Mar 12, 2026

@squah-confluent Could you please create a dedicated jira for this one?

@squah-confluent squah-confluent changed the title KAFKA-20251 [1/N]: Add broker configs for assignment batching and offload KAFKA-20300: Add broker configs for assignment batching and offload Mar 12, 2026
@squah-confluent
Copy link
Contributor Author

squah-confluent commented Mar 12, 2026

@dajac I filed KAFKA-20300 for this.

Copy link
Member

@dajac dajac left a comment

Choose a reason for hiding this comment

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

lgtm

@dajac dajac merged commit 8337d83 into apache:trunk Mar 13, 2026
24 checks passed
@dajac dajac deleted the squah-kip-1263-add-configs-broker branch March 13, 2026 06:52
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.

2 participants