Coder Social home page Coder Social logo

Comments (4)

josevalim avatar josevalim commented on July 17, 2024

latest will get the latest entry before the consumer group offset is committed. If you want to consume what was there before the consumer group started, you want earliest. :)

from broadway.

yordis avatar yordis commented on July 17, 2024

Hey @josevalim watching the following video https://youtu.be/ovdSOIXSyzI from Confluent peeps at 6:48; he mentioned the following:

6:47: If the consumer group instance is restarted,
6:48: the first thing it can do is to make a request
6:52: to the coordinator to retrieve its last committed offset.
6:55: And once it has the offset,
6:56: it can resume the consumption
6:59: from that particular offset.
7:00: If this consumer instance is started for the very first time
7:03: and there's no saved position for this consumer group,
7:07: then you can either start consuming
7:10: from the very beginning of this topic partition
7:13: or from the very latest offset.

Mainly the following (I am highlighting a few keywords with asterisks)

7:04 If this consumer instance is started for the **very first time**
7:03 and there's **no saved position for this consumer group**,
7:07 then you can either start consuming
7:10 from the very beginning of this topic partition
7:13 or from the very latest offset.

Reading your comment you mentioned the following:

If you want to consume what was there before the consumer group started

Did you explicitly mean to say started but exclude restarted?

I am trying to understand the expected behavior here because my understanding is that based on what the video is saying after a Consumer Group offset is committed, the value of offset_reset_policy doesn't matter anymore because an offset was committed. It would matter only the very first time the consumer group starts.

Right?

from broadway.

yordis avatar yordis commented on July 17, 2024

Kind of related to dashbitco/broadway_kafka#27, it said that it was fixed.

We are observing the following.

  1. We started the consumer with :latest and processed and commit the offset
  2. We changed to be :earliest
  3. We re-consumed the messages

I would expect the offset_reset_policy to be ignored once some consumer group offset is committed.

from broadway.

josevalim avatar josevalim commented on July 17, 2024

I would expect the offset_reset_policy to be ignored once some consumer group offset is committed.

Me too.

from broadway.

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.