conduktor.io ↗

heartbeat.interval.ms — Kafka Consumer Configuration

The expected time between heartbeats to the group coordinator when using Kafka's group management facilities. Heartbeats are used to ensure that the worker's session stays active and to facilitate rebalancing when new members join or leave the group.

Description

The expected time between heartbeats to the group coordinator when using Kafka's group management facilities. Heartbeats are used to ensure that the worker's session stays active and to facilitate rebalancing when new members join or leave the group. The value must be set lower than session.timeout.ms, but typically should be set no higher than 1/3 of that value. It can be adjusted even lower to control the expected time for normal rebalances.

Default Values by Kafka Version

Kafka VersionDefault Value
0.9.03000
0.10.03000
0.10.13000
0.10.23000
0.11.03000
1.03000
1.13000
2.03000
2.13000
2.23000
2.33000
2.43000
2.53000
2.63000 (3 seconds)
2.73000 (3 seconds)
2.83000 (3 seconds)
3.03000 (3 seconds)
3.13000 (3 seconds)
3.23000 (3 seconds)
3.33000 (3 seconds)
3.43000 (3 seconds)
3.53000 (3 seconds)
3.63000 (3 seconds)
3.73000 (3 seconds)
3.83000 (3 seconds)
3.93000 (3 seconds)
4.03000 (3 seconds)
4.13000 (3 seconds)
4.23000 (3 seconds)

Tuning Recommendation

ProfileRecommendedWhy
consumer / throughput3000Heartbeats run on a background thread independent of poll(); the 3s default sends ~15 heartbeats per session.timeout.ms window (45s / 3s), providing adequate failure detection without adding network overhead. Lowering it wastes CPU and network on heartbeat RPCs that add no throughput value.
consumer / latency2000With session.timeout.ms=10s, reducing heartbeat interval to 2s maintains the 1:5 ratio (session / heartbeat) needed for reliable liveness detection. Sends heartbeats 5x per session window, allowing 4 missed beats before timeout — sufficient to survive transient GC pauses.

Related Configs

max.poll.interval.ms · session.timeout.ms

Manage Kafka configs across all your clusters with Conduktor Console — view, compare, and update configurations in one place.