Skip to content

commitOffsets can be passed the offsets to commit#10

Closed
squito wants to merge 2 commits intoapache:0.8from
squito:commitOffsets_param
Closed

commitOffsets can be passed the offsets to commit#10
squito wants to merge 2 commits intoapache:0.8from
squito:commitOffsets_param

Conversation

@squito
Copy link

@squito squito commented Nov 25, 2013

This adds another version of commitOffsets that takes the offsets to commit as a parameter.

Without this change, getting correct user code is very hard. Despite kafka's at-least-once guarantees, most user code doesn't actually have that guarantee, and is almost certainly wrong if doing batch processing. Getting it right requires some very careful synchronization between all consumer threads, which is both:

  1. painful to get right
  2. slow b/c of the need to stop all workers during a commit.

This small change simplifies a lot of this. This was discussed extensively on the user mailing list, on the thread "are kafka consumer apps guaranteed to see msgs at least once?"

You can also see an example implementation of a user api which makes use of this, to get proper at-least-once guarantees by user code, even for batches:
https://github.com/quantifind/kafka-utils/pull/1

I'm open to any suggestions on how to add unit tests for this.

@lazyval
Copy link
Contributor

lazyval commented Nov 25, 2013

@squito AFAIK code improvements are only accepted in a form of jira ticket + attached patch file. Not absolutely sure what is the official policy, but looks like this mirror is kept only for code navigation/personal forks purpose.

@squito
Copy link
Author

squito commented Nov 25, 2013

thanks @lazyval . I've created this ticket https://issues.apache.org/jira/browse/KAFKA-1144 .

@squito squito closed this Nov 25, 2013
@lazyval lazyval mentioned this pull request Jan 14, 2014
ymatsuda referenced this pull request in confluentinc/kafka Aug 5, 2015
ymatsuda pushed a commit to ymatsuda/kafka that referenced this pull request Aug 27, 2015
Parth-Brahmbhatt pushed a commit to Parth-Brahmbhatt/kafka that referenced this pull request Nov 3, 2015
BUG-45592: Migration script for Upgrading old acls to new acls.
xiowu0 pushed a commit to xiowu0/kafka that referenced this pull request Apr 2, 2019
…s Java objects as arguments. (apache#10)

Reviewers: Radai Rosenblatt, Ke Hu
abhishekmendhekar pushed a commit to abhishekmendhekar/kafka that referenced this pull request Jun 12, 2019
…ce only takes Java objects as arguments. (apache#10)

TICKET =
LI_DESCRIPTION =

Reviewers: Radai Rosenblatt, Ke Hu

EXIT_CRITERIA = MANUAL ["describe exit criteria"]
efeg pushed a commit to efeg/kafka that referenced this pull request Jan 29, 2020
…md (apache#10)

Clean up metrics aggregator. 
Improve quick start procedure in README.md
Fixed a bug in the MetricCompletenessChecker
lianetm added a commit to lianetm/kafka that referenced this pull request Jun 2, 2023
* beginningOffsets and endOffsets implementation

* ListOffsetsRequestManager implementation & event processing integration
lianetm added a commit to lianetm/kafka that referenced this pull request Jun 12, 2023
* beginningOffsets and endOffsets implementation

* ListOffsetsRequestManager implementation & event processing integration
brandboat pushed a commit to brandboat/kafka that referenced this pull request Sep 15, 2025
…tadata-manager

Add remote cluster metadata manager
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants