aio-libs / aiokafka

asyncio client for kafka
http://aiokafka.readthedocs.io/
Apache License 2.0
1.13k stars 228 forks source link

[QUESTION] Is there a way to monitor the heartbeat state? #1040

Open simonzhlx opened 1 month ago

simonzhlx commented 1 month ago

I'm doing kind of health-check stuff for consumers and would like to leverage current heartbeat state to do it. Like mark the consumer pod as failed once the heartbeat is failed. I found we could see the heartbeat failed logs but it seems that the heartbeat failure is not exposed as an event or an error by AIOKafka. Is there a way that I can use to capture the heartbeat failure in my consumer code? Thanks