[ https://issues.apache.org/jira/browse/KAFKA-6995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17451907#comment-17451907 ]
Jørgen commented on KAFKA-6995: ------------------------------- Are there any other ways to proactively leave the group when a KS stops gracefully, except "internal.leave.group.on.close"? We have a lot of stateless applications where we want to trigger rebalance immediately if an instance is stopped to reduce downtime? Calling kafka-consumer#close explicitly sends a leave-group to trigger rebalance. From kafka definitive guide: {quote}When closing a consumer cleanly, the consumer will notify the group coordinator that it is leaving, and the group coordinator will trigger a rebalance immediately, reducing the gap in processing. {quote} This would be very convenient for many of our kafka-streams usecases as well. The new default in KIP-735 also makes this a bigger problem (45s session timeout). > Make config "internal.leave.group.on.close" public > -------------------------------------------------- > > Key: KAFKA-6995 > URL: https://issues.apache.org/jira/browse/KAFKA-6995 > Project: Kafka > Issue Type: Improvement > Components: consumer, streams > Reporter: Boyang Chen > Assignee: Boyang Chen > Priority: Major > Labels: needs-kip > > We are proposing to make the config "internal.leave.group.on.close" public. > The reason is that for heavy state application the sticky assignment won't > work because each stream worker will leave group during rolling restart, and > there is a possibility that some members are left and rejoined while others > are still awaiting restart. This would then cause multiple rebalance because > after the ongoing rebalance is done, we are expecting late members to rejoin > and move state from `stable` to `prepareBalance`. To solve this problem, > heavy state application needs to use this config to avoid member list update, > so that at most one rebalance will be triggered at a proper time when all the > members are rejoined during rolling restart. This should just be one line > change. > Code here: > * <code>internal.leave.group.on.close</code> > * Whether or not the consumer should leave the group on close. If set to > <code>false</code> then a rebalance > * won't occur until <code>session.timeout.ms</code> expires. > * > * <p> > * Note: this is an internal configuration and could be changed in the future > in a backward incompatible way > * > */ > static final String LEAVE_GROUP_ON_CLOSE_CONFIG = > "internal.leave.group.on.close"; -- This message was sent by Atlassian Jira (v8.20.1#820001)