[Kafka] Kafka consumer parameters

Insert picture description here

1 Overview

The following introduces some of the main parameters of kafka consumers

1.1 session.timeout.ms

One of the very important parameters! Many Kafka beginners do not know exactly what this parameter is used for, so let's discuss it in detail below. In simple terms, session.timeout.ms is the time when the consumer group detects the sending crash of members in the group.

Suppose you set this parameter to 5 minutes, then when a group member suddenly collapses (such as being killed -9 or Rock Machine), the Kafka component of the management group (the consumer group coordinator, also known as group coordinator,
coordinator has It may take 5 minutes to perceive this crash. Obviously we want to shorten this time so that the coordinator can detect consumer failures faster. Unfortunately, this parameter has another meaning: the maximum time of consumer message processing logic one by one if the gap between the consumer poll twice exceeds the parameters set by
Lanna value is set, then the coordinator will consider the progress of other members of the consumption of this consumer group has to catch up, so will the consumer instance "kicked out "Group, the partition that the consumer is responsible for will also be assigned to other consumers.

In the best case, this will

Guess you like

Origin blog.csdn.net/qq_21383435/article/details/111409320