Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The meaning of 'request.timeout.ms' of Kafka producer makes me confused

Well, I find that the meaning of request.timeout.ms of Kafka 0.8.2 differs from Kafka 0.10.0.

https://kafka.apache.org/082/documentation.html

https://kafka.apache.org/documentation/

Kafka 0.8.2: request.timeout.ms The amount of time the broker will wait trying to meet the request.required.acks requirement before sending back an error to the client.

Kafka 0.11.0: request.timeout.ms The configuration controls the maximum amount of time the client will wait for the response of a request. If the response is not received before the timeout elapses the client will resend the request if necessary or fail the request if retries are exhausted.

like image 465
Brooklyn Knightley Avatar asked Aug 31 '25 06:08

Brooklyn Knightley


1 Answers

In Kafka 0.8.2 the request.timeout.ms is related to the producer. As you know the producer chose to receive the ack in three different cases : when just sent, when leader receives and writes message, when leader and all replicas receive and write message. The timeout is the time a broker waits one of the above condition (for sending ack to producer) before sending an error : the ack can't be sent on time and timeout expires. In Kafka 0.11 this timeout is more general and used even for consumer and admin client : it's the timeout for a generic request and not strictly related to write message.

like image 186
ppatierno Avatar answered Sep 02 '25 20:09

ppatierno