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.
| Version | Kafka | Changes |
|---|---|---|
| JoinGroupRequest | ||
| v0 | 2.2 | + GroupId string+ SessionTimeoutMs int32+ MemberId string+ ProtocolType string+ Protocols []JoinGroupRequestProtocol+ Name string+ Metadata bytes |
| v1 | 2.2 | + RebalanceTimeoutMs int32adds RebalanceTimeoutMs. Version 2 and 3 are the same as version 1. Starting from version 4, the client needs to issue a second request to join group Starting from version 5, we add a new field called groupInstanceId to indicate member identity across restarts. with assigned id. |
| v2 | 2.2 | No changes |
| v3 | 2.2 | No changes |
| v4 | 2.2 | No changes |
| v5 | 2.3 | + GroupInstanceId string |
| v6 | 2.4 | ~ Flexible encoding enabled FLEXIBLE is the first flexible version. |
| v7 | 2.5 | is the same as version 6. |
| v8 | 3.2 | + Reason stringadds the Reason field (KIP-800). |
| v9 | 3.2 | is the same as version 8. |
| JoinGroupResponse | ||
| v0 | 2.2 | + ErrorCode int16+ GenerationId int32+ ProtocolName string+ Leader string+ MemberId string+ Members []JoinGroupResponseMember+ MemberId string+ Metadata bytes |
| v1 | 2.2 | is the same as version 0. |
| v2 | 2.2 | + ThrottleTimeMs int32adds throttle time. |
| v3 | 2.2 | on quota violation, brokers send out responses before throttling. |
| v4 | 2.2 | the client needs to issue a second request to join group with assigned id. |
| v5 | 2.3 | + GroupInstanceId stringis bumped to apply group.instance.id to identify member across restarts. |
| v6 | 2.4 | ~ Flexible encoding enabled FLEXIBLE is the first flexible version. Starting from version 7, the broker sends back the Protocol Type to the client (KIP-559). |
| v7 | 2.5 | + ProtocolType string~ ProtocolName became nullable |
| v8 | 3.2 | is the same as version 7. |
| v9 | 3.2 | + SkipAssignment booladds the SkipAssignment field. |