conduktor.io ↗

session.timeout.ms — Kafka Consumer Configuration

The timeout used to detect worker failures. The worker sends periodic heartbeats to indicate its liveness to the broker.

Description

The timeout used to detect worker failures. The worker sends periodic heartbeats to indicate its liveness to the broker. If no heartbeats are received by the broker before the expiration of this session timeout, then the broker will remove the worker from the group and initiate a rebalance. Note that the value must be in the allowable range as configured in the broker configuration by group.min.session.timeout.ms and group.max.session.timeout.ms.

Default Values by Kafka Version

Kafka VersionDefault Value
0.9.030000
0.10.030000
0.10.110000
0.10.210000
0.11.010000
1.010000
1.110000
2.010000
2.110000
2.210000
2.310000
2.410000
2.510000
2.610000 (10 seconds)
2.710000 (10 seconds)
2.810000 (10 seconds)
3.045000 (45 seconds)
3.145000 (45 seconds)
3.245000 (45 seconds)
3.345000 (45 seconds)
3.445000 (45 seconds)
3.545000 (45 seconds)
3.645000 (45 seconds)
3.745000 (45 seconds)
3.845000 (45 seconds)
3.945000 (45 seconds)
4.045000 (45 seconds)
4.145000 (45 seconds)
4.245000 (45 seconds)

Tuning Recommendation

ProfileRecommendedWhy
consumer / throughput45000The 45s default is well-suited for high-throughput scenarios: long enough to survive GC pauses or broker failovers without triggering unnecessary rebalances, short enough to detect genuinely dead consumers within a reasonable window.
consumer / latency10000Reducing session timeout to 10s enables faster failover: when a consumer crashes, its partitions are reassigned within 10s instead of 45s, maintaining low lag for other consumers in the group. Critical for latency-sensitive pipelines where lag accumulation during failover is unacceptable.
consumer / durability45000The 45s default is appropriate for durable consumers: long enough to survive JVM GC pauses, network blips, and coordinator elections without triggering unnecessary rebalances that interrupt in-progress commits. Reducing it increases rebalance frequency, which is the primary cause of duplicate processing in at-least-once consumers.

Related Configs

max.poll.interval.ms · heartbeat.interval.ms · partition.assignment.strategy · group.instance.id · request.timeout.ms

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