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.
Wire Diagram
Response Header · flexible
message_size
int32 · 4B
correlation_id
int32 · 4B
tagged
var
JoinGroupResponse v6
ThrottleTimeMs
int32 · 4B
ErrorCode
int16 · 2B
GenerationId
int32 · 4B
ProtocolName
string (compact)
Leader
string (compact)
MemberId
string (compact)
tagged
var
MemberId
string (compact)
GroupInstanceId?
string (compact)
Metadata
bytes (compact)
tagged
var
Schema & Example
Schema { "ThrottleTimeMs": int32, "ErrorCode": int16, "GenerationId": int32, "ProtocolName": string, "Leader": string, "MemberId": string, "Members": [{ "MemberId": string, "GroupInstanceId": string?, "Metadata": bytes }] }
Example { "ThrottleTimeMs": 0, "ErrorCode": 0, "GenerationId": 5, "ProtocolName": "range", "Leader": "consumer-1-abc123", "MemberId": "consumer-1-abc123", "Members": [{ "MemberId": "consumer-1-abc123", "GroupInstanceId": "instance-0", "Metadata": "<metadata>" }] }