Kafka gateway: Kafka LeaveGroup and consumer group rebalance semantics
- Dominant language
- Rust
- Stars
- 4.9k
- Forks
- 432
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 174
Description
Part of #3560.
## Summary
Implement **LeaveGroup (13)** and complete rebalance edge cases for consumer groups.
## Depends on
- #3541 — JoinGroup / Heartbeat / SyncGroup
## Scope
- [ ] Graceful LeaveGroup removes member and triggers rebalance
- [ ] Static membership / generation id behavior documented
- [ ] Consumer failure without LeaveGroup handled via session timeout (#3541)
- [ ] Tests: N consumers join/leave, partitions reassigned
## Acceptance criteria
- [ ] Rebalance on heartbeat timeout verified in test
- [ ] Graceful shutdown releases partitions promptly
Contributor guide
Research direction
Begin with issue #3541 to understand the JoinGroup, Heartbeat, and SyncGroup dependency, then trace the Kafka gateway's consumer-group handling for LeaveGroup and timeout paths. Add tests covering N consumers joining and leaving, heartbeat-timeout rebalances, partition reassignment, and prompt release during graceful shutdown; done means all listed acceptance criteria pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kafka, rust
- Domain
- distributed-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100