What is ConsumerGroupHeartbeat?
The new consumer protocol (KIP-848) combines liveness, subscription updates, and incremental assignment acknowledgment into a single recurring heartbeat. Unlike classic JoinGroup/SyncGroup, this protocol supports incremental partition assignment, avoiding stop-the-world rebalances in large consumer groups.
Wire Diagram
Response Header · flexible
message_size
int32 · 4B
correlation_id
int32 · 4B
tagged
var
ConsumerGroupHeartbeatResponse v0
ThrottleTimeMs
int32 · 4B
ErrorCode
int16 · 2B
ErrorMessage?
string (compact)
MemberId?
string (compact)
MemberEpoch
int32 · 4B
HeartbeatIntervalMs
int32 · 4B
tagged
var
tagged
var
TopicId
uuid · 16B
Partitions
[]int32
tagged
var
Schema & Example
Schema { "ThrottleTimeMs": int32, "ErrorCode": int16, "ErrorMessage": string?, "MemberId": string?, "MemberEpoch": int32, "HeartbeatIntervalMs": int32, "Assignment": { "TopicPartitions": [{ "TopicId": uuid, "Partitions": [int32] }] }? }
Example { "ThrottleTimeMs": 0, "ErrorCode": 0, "ErrorMessage": null, "MemberId": "consumer-1-abc123", "MemberEpoch": 12, "HeartbeatIntervalMs": 3000, "Assignment": { "TopicPartitions": [{ "TopicId": "550e8400-e29b-41d4-a716-446655440000", "Partitions": [1, 2, 3] }] }? }