Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Status

Current state: Under Discussion Accepted

Discussion thread: https://lists.apache.org/thread/t4h273md03vzcbzk4r3bn86km8rnym66

Vote thread: https://lists.apache.org/thread/j0ol8tk2fdyk0bk6x859yw5dtjh8h1xc

JIRA:

Jira
serverASF JIRA
serverId5aa69414-a9e9-3523-82ec-879b028fb15b
keyKAFKA-20167

...

  • Classic Protocol: REMAIN_IN_GROUP behaves as expected, the member stays in the consumer group, enabling a faster rebalance upon restart.
  • Streams Protocol (KIP-1071), dynamic member: The member unconditionally leaves the group regardless of this setting, since remaining in the group provides no benefit for non-static members under the new protocol.
  • Streams Protocol (KIP-1071), static member: The member should remain in the group by defaulㄎtdefault. Static membership is explicitly configured to reduce rebalance disruption on restart, and leaving the group on close would significantly reduce the benefit of static membership.. Notably, the underlying consumer already differentiates close semantics based on membership type, making this behavior both natural and consistent.

...

Currently, the Streams Protocol implementation in StreamsGroupHeartbeatManager does not honor REMAIN_IN_GROUP. This gap must be addressed as part of this KIP to ensure the option functions correctly end-to-end under KIP-1071: Streams Rebalance Protocol#Compatibility,DeprecationandMigrationPlan.

Behavior Matrix

Consumer LEAVEConsumer LEAVEConsumer LEAVE
Streams CloseOptionClassic Protocol (Dynamic Member)Classic Protocol (Static Member)Streams Protocol (Dynamic Member)Streams Protocol (Static Member)
close() (current) [1]Consumer REMAINConsumer REMAINConsumer LEAVE
N/A
close() (new) [2]Consumer REMAINConsumer REMAINConsumer DEFAULT (LEAVE)Consumer DEFAULT (REMAIN)
close(REMAIN_IN_GROUP) (current)Consumer REMAINConsumer REMAINConsumer LEAVE
N/A
close(REMAIN_IN_GROUP) (new)Consumer REMAINConsumer REMAINConsumer REMAINConsumer REMAIN
close(LEAVE_GROUP) (current)Consumer LEAVEConsumer LEAVEConsumer LEAVE
N/A
close(LEAVE_GROUP) (new)Consumer LEAVEConsumer LEAVEConsumer LEAVEConsumer LEAVE

Legend:

  1. close() (current) internally delegates to close(REMAIN_IN_GROUP) 
  2. close() (new) internally delegates to close(DEFAULT) 

...