Skip to content
loading...

Help needed regarding apache kafka golang

pragmaticpi profile image Piyush Kumar twitter logo github logo ・1 min read

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?

Thanks

twitter logo DISCUSS
Discussion
markdown guide
Classic DEV Post from Aug 4 '19

You're not worth hiring unless...

Piyush Kumar profile image
Software Engineer. Java, Python, Golang. Interested in DevOps and distributed systems. :wq