I am currently running kafka 0.10.0.1, and the relevant documents for these two values ββare as follows:
heartbeat.interval.ms - The
expected time between heartbeats for the consumer coordinator using the Kafka group controls. Heartbeats are used to ensure that a consumer session remains active and helps rebalance when new users join or leave a group. The value should be set below session.timeout.ms, but usually should be set no more than 1/3 of this value. It can be set even lower to control the expected time for normal rebalances.
session.timeout.ms -
Timeout used to detect failures when using the Kafka group management tools. When the user's pulse is not received during the session timeout, the broker will mark the consumer as unsuccessful and rebalance the group. Because heartbeats are only sent when poll () is called, a longer session timeout allows more time to process messages in the consumer polling cycle due to a longer time to detect hard failures. See Also max.poll.records for another parameter to control processing time in a polling cycle.
It is not clear to me why the documents recommend setting it heartbeat.interval.msto 1/3 of session.timeout.ms. Doesn't it make sense that these values ββare the same, since a heartbeat is only sent when called, poll()and therefore when processing current records?
novon source
share