conduktor.io ↗

Kafka JoinGroup Response Wire Format v7 — Binary Protocol Layout

What is JoinGroup?

Triggers a rebalance: any new member, departing member, or subscription change causes all members to call JoinGroup and wait at a synchronization barrier. The leader (first joiner) receives all members' metadata and runs the partition assignor.

Related Errors

COORDINATOR_NOT_AVAILABLE · FENCED_INSTANCE_ID · GROUP_AUTHORIZATION_FAILED · GROUP_MAX_SIZE_REACHED · INCONSISTENT_GROUP_PROTOCOL · INVALID_GROUP_ID · INVALID_SESSION_TIMEOUT · MEMBER_ID_REQUIRED · UNKNOWN_MEMBER_ID

Wire Diagram

Response Header · flexible
message_size int32 · 4B
correlation_id int32 · 4B
tagged var
JoinGroupResponse v7
ThrottleTimeMs int32 · 4B
ErrorCode int16 · 2B
GenerationId int32 · 4B
ProtocolType? string (compact)
ProtocolName? string (compact)
Leader string (compact)
MemberId string (compact)
Members array
tagged var
MemberId string (compact)
GroupInstanceId? string (compact)
Metadata bytes (compact)
tagged var

Schema & Example

Schema
{
  "ThrottleTimeMs": int32,
  "ErrorCode": int16,
  "GenerationId": int32,
  "ProtocolType": string?,
  "ProtocolName": string?,
  "Leader": string,
  "MemberId": string,
  "Members": [{
      "MemberId": string,
      "GroupInstanceId": string?,
      "Metadata": bytes
  }]
}
Example
{
  "ThrottleTimeMs": 0,
  "ErrorCode": 0,
  "GenerationId": 5,
  "ProtocolType": "consumer",
  "ProtocolName": null,
  "Leader": "consumer-1-abc123",
  "MemberId": "consumer-1-abc123",
  "Members": [{
      "MemberId": "consumer-1-abc123",
      "GroupInstanceId": "instance-0",
      "Metadata": "<metadata>"
  }]
}