Quantcast
Channel: Active questions tagged consumer - Stack Overflow
Viewing all articles
Browse latest Browse all 87

How to close the kafka consumer in python at x min?

$
0
0

I am writing a kafka message to a file in python and want to close the consumer at x time.

consumer = KafkaConsumer(bootstrap_servers='xxx:xx',                     group_id=mygroupid,                     security_protocol='SSL',                     ssl_check_hostname=True,                     ssl_cafile='cccc.pem',                     ssl_certfile='sss.pem',                     ssl_keyfile='kk.pem',                     auto_offset_reset='latest',                     consumer_timeout_ms=60000)

using this consumer_timeout_ms=60000 my kafka is not getting close.


Viewing all articles
Browse latest Browse all 87

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>