conduktor.io ↗

Kafka JoinGroup Request Wire Format v2 — 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

Request Header
message_size int32 · 4B
api_key int16 · 2B
api_version int16 · 2B
correlation_id int32 · 4B
client_id string
JoinGroupRequest v2
GroupId string
SessionTimeoutMs int32 · 4B
RebalanceTimeoutMs int32 · 4B
MemberId string
ProtocolType string
Protocols array
Name string
Metadata bytes

Schema & Example

Schema
{
  "GroupId": string,
  "SessionTimeoutMs": int32,
  "RebalanceTimeoutMs": int32,
  "MemberId": string,
  "ProtocolType": string,
  "Protocols": [{
      "Name": string,
      "Metadata": bytes
  }]
}
Example
{
  "GroupId": "order-processors",
  "SessionTimeoutMs": 30000,
  "RebalanceTimeoutMs": 300000,
  "MemberId": "consumer-1-abc123",
  "ProtocolType": "consumer",
  "Protocols": [{
      "Name": "orders",
      "Metadata": "<metadata>"
  }]
}