conduktor.io ↗

KIP-1092 — Extend Consumer#close with an option to leave the group or not

Accepted Kafka 4.1 ConsumerStreams

Adds a `leaveGroup` boolean option to `KafkaConsumer#close()` (and `KafkaStreams#close(CloseOptions)`) so callers can control whether the consumer sends a `LeaveGroup` request before closing, triggering an immediate rebalance. Kafka Streams hardcodes `internal.leave.group.on.close=false` for efficiency during topology restarts, but this makes graceful scale-down scenarios wait for the session timeout to expire before triggering a rebalance.

Details

AuthorTengYao Chi
StatusAccepted
Kafka Version4.1
JIRAKAFKA-16758
WikiView on Apache Wiki
Created2024-09-17
Last Modified2025-04-26
Explore how this KIP affects the Kafka protocol in the Protocol Explorer, or see the full KIP database.