conduktor.io ↗

Kafka LeaveGroup Response Wire Format v3 — Binary Protocol Layout

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.

Related Errors

COORDINATOR_NOT_AVAILABLE · GROUP_AUTHORIZATION_FAILED · INVALID_GROUP_ID · UNKNOWN_MEMBER_ID

Wire Diagram

Response Header
message_size int32 · 4B
correlation_id int32 · 4B
LeaveGroupResponse v3
ThrottleTimeMs int32 · 4B
ErrorCode int16 · 2B
Members array
MemberId string
GroupInstanceId? string
ErrorCode int16 · 2B

Schema & Example

Schema
{
  "ThrottleTimeMs": int32,
  "ErrorCode": int16,
  "Members": [{
      "MemberId": string,
      "GroupInstanceId": string?,
      "ErrorCode": int16
  }]
}
Example
{
  "ThrottleTimeMs": 0,
  "ErrorCode": 0,
  "Members": [{
      "MemberId": "consumer-1-abc123",
      "GroupInstanceId": null,
      "ErrorCode": 0
  }]
}