conduktor.io ↗

Kafka ConsumerGroupHeartbeat Response Wire Format v0 — Binary Protocol Layout

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.

Related Errors

COORDINATOR_NOT_AVAILABLE · FENCED_MEMBER_EPOCH · GROUP_AUTHORIZATION_FAILED · MEMBER_ID_REQUIRED · STALE_MEMBER_EPOCH · TOPIC_AUTHORIZATION_FAILED · UNRELEASED_INSTANCE_ID · UNSUPPORTED_ASSIGNOR · UNSUPPORTED_VERSION

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
Assignment? struct
tagged var
TopicPartitions array
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]
    }]
  }?
}