What is LeaveGroup?
Sent on clean consumer shutdown to trigger an immediate rebalance rather than waiting for the session timeout. Without it, a departed consumer's partitions stay unassigned for up to session.timeout.ms. Static membership (group.instance.id) avoids rebalances on short restarts by skipping LeaveGroup semantics.
Wire Diagram
Response Header
message_size
int32 · 4B
correlation_id
int32 · 4B
LeaveGroupResponse v1
ThrottleTimeMs
int32 · 4B
ErrorCode
int16 · 2B
Schema & Example
Schema { "ThrottleTimeMs": int32, "ErrorCode": int16 }
Example { "ThrottleTimeMs": 0, "ErrorCode": 0 }