DEV Community

Piyush Kumar
Piyush Kumar

Posted on

Help needed regarding apache kafka golang

Hi all, I am currently working on Apache Kafka using go/golang confluent library. I have some doubts regarding consumer and its APIs.

  1. I am using pause and resume APIs of the library and doing manual commits. Let's say, I send 100 messages and without committing, I paused consumer and resume it afterward. I notice it didn't consume those 100 messages again but it started consuming the latest messages. Is this an expected behavior? If yes, is there a way to consume those 100 messages again.

  2. When I am resuming the consumers, after some processing, I am doing manual commit. I noticed the return offset committed is -1001 for a partition. I am not able to understand why it is happening and what it means? Did I lose all the data or the commit failed?

  3. Can someone please explain to me auto.offset.reset - latest and earliest?


Top comments (0)