-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Latest Release (0.3.1) seems to always start from earliest offset #74
Comments
It seems like a regression as there were changes to the offset computation here: #72 |
@jamespeterschinner it seems the PR: #72 caused a regression i reported here |
@amacciola could you provide some more information on the settings being used? Im assuming your using an offset reset policy of :latest? The PR you mentioned was to fix an issue I had with offset out of range error not being resolved. That error is generated when trying to fetch events and it could be argued it's best handled in that function, but seeing as there is a 'resolve' function that seemed incorrect. There is a chance the I suppose if we check all the relevant Kafka settings; how the group coordinator is assigning offsets and any other relevant details and nothing it found. We should probably just revert the change |
@jamespeterschinner no my configuration surrounding the offsets are
That is because i re-use the same group ID when i pause and resume pipelines however if i This works as expected on version |
@amacciola I'm trying to understand how this change makes sense of the behaviour/use case you describe. Here is what I have: When you create a new consumer group, the groups offsets (for each partition) are undefined, with both the prior and current release broadway_kafka will resolve this to the offset as set in the offset reset policy (earliest/latest). (This is the bit where I'm making some assumptions to in order for this to make sense) With the prior implementation if the group coordinator assigns broadway_kafka an offset that is out of the valid range, it'll still try and fetch the offset from the broker. If the broker has the The latest release, will identify that the offset is out of range before trying to fetch the offset and apply the offset reset policy (in this case earliest) which is the opposite of the behaviour you wanted. If the scenario I described above is correct, it sounds to me like you actually want the If this is the case, what the prior release called If my above guess is correct and we agree that the definitions of what the These are the definitions for these settings in brod: https://hexdocs.pm/brod/ (the kafka library broadway_kafka wraps)
A more drastic change would be to simply wrap the |
@jamespeterschinner This is what expect yes. I do believe the previous version was just allowing the configs to be used incorrectly, or being misleading. I am going to test the latest release (0.3.1) with setting:
and see if it gives me the outcome i am expecting. Regardless with version (0.3.1) there will need to be some form of documentation update to just let others know of this change of functionality and what configs they should be expecting to set |
@amacciola I should have been clearer, currently broadway_kafka doesn't have a That would need to e handled on this line here: https://github.com/dashbitco/broadway_kafka/blob/main/lib/broadway_kafka/brod_client.ex#L152 I think this is the key thing we need to agree upon is:
Should the brokers auto offset reset take precedence over clients offset reset policy or the other way around (currently it's the other way around)? |
When upgrading from 0.3.0 -> 0.3.1. I started to notice that when i restart my application, my Broadway Kafka Ingest Pipelines would come back up as well (using the same
name
andgroup_id
that it was before the application restarted). However now on the new release version when the pipeline comes back up it starts Ingesting from the earliest offset every single time. Which is a major issue.Did something change with how i need to be setting the Group_id or the Pipeline name ? Or is this just a Regression ?
The text was updated successfully, but these errors were encountered: