Kafka10.1 heartbeat.interval.ms, session.timeout.ms and max.poll.interval.ms

I am using kafka 0.10.1.1 and am confused with the following 3 properties.

heartbeat.interval.ms
session.timeout.ms
max.poll.interval.ms

heartbeat.interval.ms . This was added in 0.10.1 and it will send a heartbeat between polls. session.timeout.ms . This should start balancing if there is no request for kafka, and it receives a reset in each poll. max.poll.interval.ms . This is a survey.

But when does kafka begin to balance? Why do we need these 3? What are the default values ​​for all of them?

thank

+22
source share
3 answers

, Kafka 0.10.1.0 , . - , poll; - , .

session.timeout.ms - . - , .

max.poll.interval.ms . , , , , .

heartbeat.interval.ms , . , , REBALANCE_IN_PROGRESS. , , .

:
session.timeout.ms: , , 10 .
max.poll.interval.ms:
heartbeat.interval.ms: , 1/3 session.timeout.ms

+30

, ( , Poll ) "heartbeat.interval.ms", , "session.timeout.ms" "max.poll.interval.ms".

+1

session.timeout.ms heartbeat.interval.ms.

heartbeat.interval.ms , poll() KafkaConsumer , session.timeout.ms , .

. heatbeat.interval.ms , session.timeout.ms, . session.timeout.ms 3 , heartbeat.interval.ms 1 .

max.poll.interval.ms - maximum delay between poll () calls when using consumer group management. This imposes an upper bound on the amount of time during which the consumer can remain inactive until more records are received. If poll () is not called before this timeout has elapsed, then the consumer is considered to have failed and the group will be rebalanced to reassign the sections to another member.

0
source

Source: https://habr.com/ru/post/1677219/


All Articles