Search code examples
apache-kafkakafka-producer-api

Apache Kafka Producer 'request.timeout.ms' property


I want to understanding the meaning of request.timeout.ms that is used in producer. As per the doc this property is used to expire records that have been waiting for response from server for more than request.timeout.ms which also means the records have been sitting in for more than request.timeout.ms.I discovered that request.timeout.ms is used for another purpose: to expire records that sit in batch.size for more than request.timeout.ms.Is this understanding correct?


Solution

  • Yes, any batches that have been sitting in RecordAccumulator for more than the configured request.timeout.ms due to metadata being unavailable will be thought of expired, and sender metric will record such batches for monitoring.