I am reading Kafka, the definitive guide and I came across the below point for consumers.
heartbeat.interval.ms must be lower than session.timeout.ms, and is usually set to one-third of the timeout value.
May I know why is it, I thought both should be the same, let's say if I set the session.timeout.ms to 10s and heartbeat to 3s, then if the consumer takes longer time to process the record, the broker already sends the poll and figures out the consumer already dead and rebalances, in that case, what is the purpose of session timeout property. Am I interpreting it wrong?