conduktor.io ↗

Kafka Heartbeat Response Wire Format v2 — 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

Response Header
message_size int32 · 4B
correlation_id int32 · 4B
HeartbeatResponse v2
ThrottleTimeMs int32 · 4B
ErrorCode int16 · 2B

Schema & Example

Schema
{
  "ThrottleTimeMs": int32,
  "ErrorCode": int16
}
Example
{
  "ThrottleTimeMs": 0,
  "ErrorCode": 0
}