Giter Club home page Giter Club logo

Comments (6)

vtolstov avatar vtolstov commented on July 22, 2024

as you see lag always 1 and after i'm restart test last record always processed.

from franz-go.

vtolstov avatar vtolstov commented on July 22, 2024

i have such issue in other kafka driver (segmentio/kafka-go) when commit current record offset and not next offset.
https://kafka.apache.org/22/javadoc/index.html?org/apache/kafka/clients/consumer/KafkaConsumer.html#:~:text=Note%3A%20The%20committed%20offset%20should,of%20the%20last%20message%20processed

can you check this? or i have may be error in my code (but i dont think so)
https://github.com/unistack-org/micro-broker-kgo/blob/master/kgo.go#L486 (this is my code, i'm simply run CommitRecords)

from franz-go.

vtolstov avatar vtolstov commented on July 22, 2024

@twmb i think you need to https://github.com/twmb/franz-go/blob/v0.10.1/pkg/kgo/consumer_group.go#L1687 add +1 to offset from record. in this case you don't have lag with 1 message and not double process last message each time

from franz-go.

vtolstov avatar vtolstov commented on July 22, 2024

i'm check my proposed solution and after r.Offset + 1 in 1687 lag goes to 0 and messages after restart not double processed

from franz-go.

vtolstov avatar vtolstov commented on July 22, 2024

fix #65

from franz-go.

twmb avatar twmb commented on July 22, 2024

Thank you, very obvious bug, great catch!

from franz-go.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.