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

Taught in

References