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.

OpenSearch consumer implementation: Part 4 delivery semantics

OpenSearch consumer implementation: Part 4 delivery semantics - Kafka Tutorial

From the course: Complete Guide to Apache Kafka for Beginners

OpenSearch consumer implementation: Part 4 delivery semantics

Okay. This is Stephane from Conduktor and we have our group and still some data to read. So let's go into our code and what we're going to do is around offsets commit. So if we run this code right here, just as is and I'll press tab, we have a look at the fact that we have enabled auto commit equals true. And then the auto commit interval milliseconds equals 5,000. That means that every five seconds the offsets are going to be committed. So I'm going to run this and show you. So it's running. So one, two, three, four, five. The lag has gone down. One, two, three, four, five. The lag is going down again. And then every five seconds you will see the lag going down. So this means that the auto offsets commit interval is about five seconds. So back in my code, I've stopped the consumer, so we'll still have some data to process. And what I'm going to do now is that I'm going to commit offsets manually. So what I have to do is to do enable auto offset config and we'll have this one as…

Contents