Weblogs

September 30

Exploring Apache Kafka today. I got a need to check how commits work in kafka.

By default they use auto commit which commits the offsets after particular number of seconds regularly. We can change this behaviour and take control of this behaviour.

But we need to make sure how we commit. There are 2 ways, sync and async. One is blocking and another is non-blocking. We should combine both to fit our needs. We also need to keep in mind about rebalances and consumer restarts.

This went into a rabbit hole of various articles and code bases. I’ve learned a lot anyways. I’ll probably dump all of the articles and code base links here. So that I won’t miss anything or at least it’ll take the load off my mind.

I experimented with session.timeout.ms and max.poll.interval.ms but only able to trigger rebalance with max.poll.interval.ms not with session.timeout.ms, I need to check how those heartbeats work. How the main thread functioning? that part I need to explore.

I also found out about the debug and logger configs that we can pass in in the conf object.

I’ll probably compile a TIL and a blog if possible about my learnings.

In future I’ll probably train a model to extract these links for me from my blog posts? Let’s see.

I’ll explore about partition revocation callback, stats printing callback, etc. tomorrow.

#daily #kafka