From the course: Complete Guide to Apache Kafka for Beginners

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Java consumer inside consumer group

Java consumer inside consumer group - Kafka Tutorial

From the course: Complete Guide to Apache Kafka for Beginners

Java consumer inside consumer group

Hi, this is Stephane from Conduktor and in this lecture, we're going to have a look at the behavior of our consumer as part of a consumer group. We'll observe partition rebalance mechanisms and in the next lecture, we'll go one step deeper on this rebalance mechanism. So right now, let's have a look at our consumer reading from a topic with three partitions and we're going to have one, then two, then three consumers in our group. So let's get started. Okay. So let's have a look at how consumer rebalances work for my consumer. So I'm going to use the same code, but this time I'm going to remove the log info.polling because we don't need it and this will make just some noise. So let's go ahead and run this Java application. So we're going to run it. And as you can see, it's being run. And we have some log lines when we join the consumer group. We've seen this before. And as you can see, no messages have been consumed. We know this because we are consuming from the latest, but we can…

Contents