Telegraf abadoned subscription Kafka Consumer

In Telegraf Kafka Consumer I am getting the error - “Abandoned subscription because consuming was taking soo long”.

Why this log is coming, is it the issue from Kafka or from telegraf?

The error message is from sarama - underlying kafka library, essentially timed out getting data.

I would check logs on kafka server around the time of this to see what was going on. Additionally, see if you had any network outages, issues, rollouts that caused a delay or timeout. Finally, you could start to change the max_processing_time option in telegraf to see if that helps. I would start small, like move to 500ms, then 1000ms.

Hi, we are using AWS managed msk. Still this issue, is occuring. So as per as your advice, I tried with “max_processing_time”, however sometimes the issue is, I need to restart the container, because until then data does not comes and the last lines of the logs shows the same message.

The issue with restarting is that, we are having 7 days retention period so I guess offset starts reading from that point and it takes some time to fill that gap. So, I tried having two containers one with offset as newest and one with oldest and if kafka and influxdb data are out of sync, we restart the container. However, as I mentioned it takes some time to fill that gap, what can I do here?