Showing posts with label apachekafka. Show all posts
Showing posts with label apachekafka. Show all posts

Monday, 1 May 2023

Calculate Kafka Consumer lag programmatically

In this blog we will discuss how to programmatically calculate offset lag in a kafka consumer group for a topic partition. Below is an example of kafka-consumer-groups.sh  which is a command line tool to calculate offset lag for a consumer group.

Kafka consumer group Command output
Sometimes we don’t have access to the production Kafka environment. For such scenarios we can calculate offset Lag programmatically for a consumer group.

Wednesday, 27 January 2021

Useful kafka commands

For past few months I have been working with many kafka production issues and I am still trying to learn many new things about it. But while working on any kafka issue, you always want some commands to be very handy and just one click away in a file or in a blog.

Here are few kafka commands that may be very helpful to you while learning or solving any of your kafka issues. 

Here I would be referring KAFKA_HOME as your path to kafka home.