consumer_timeout_ms
A kafka-python consumer setting that ends the for loop over the consumer after this many milliseconds without a new record.
In more detail
By default the loop waits forever. The course sets it to about three seconds so scripts exit on their own once the topic goes quiet. It is specific to kafka-python and is not a broker or Java client setting.
Example
KafkaConsumer(consumer_timeout_ms=3000)Related terms
- KafkaConsumer — The kafka-python class that reads records from Kafka topics, joins consumer groups and commits offsets.
- poll loop — The loop in which a consumer repeatedly asks the broker for new records and processes them.
- millisecond — One thousandth of a second, the usual unit for request latency.
Taught in
- A Consumer In Python — Apache Kafka & Event Streaming
- Consumer Groups And Partition Assignment — Apache Kafka & Event Streaming
- Duplicates Are The Default — Apache Kafka & Event Streaming