conduktor.io ↗

Kafka Heartbeat Request Wire Format v0 — Binary Protocol Layout

What is Heartbeat?

Classic-protocol consumers send this on a fixed interval to prove liveness to the group coordinator. Missing a heartbeat within session.timeout.ms kicks the member and triggers a rebalance, usually because consumers spend too long in poll() processing, starving the heartbeat thread.

Related Errors

COORDINATOR_LOAD_IN_PROGRESS · COORDINATOR_NOT_AVAILABLE · FENCED_INSTANCE_ID · GROUP_AUTHORIZATION_FAILED · INVALID_GROUP_ID · REBALANCE_IN_PROGRESS · 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
HeartbeatRequest v0
GroupId string
GenerationId int32 · 4B
MemberId string

Schema & Example

Schema
{
  "GroupId": string,
  "GenerationId": int32,
  "MemberId": string
}
Example
{
  "GroupId": "order-processors",
  "GenerationId": 5,
  "MemberId": "consumer-1-abc123"
}