Skip to content
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

Add an option to only commit consumer offsets for records that are not filtered out using RecordFilterStrategy #3562

Open
geertvb opened this issue Oct 18, 2024 · 1 comment

Comments

@geertvb
Copy link

geertvb commented Oct 18, 2024

Expected Behavior

When using a RecordFilterStrategy in combination with an AckMode like RECORD, only the consumer offsets of the records that have been handled, should be committed.

Suggestion: Add a new AckMode = RECORD_FILTERED that commits the offset only when a record is not filtered out.

Current Behavior

When using ack-mode: RECORD, the offset of every record is committed to Kafka even if it was filtered out.

Context

The synchronous commit of consumer record offset is an expensive operation.
It slows down record consumption unnecessarily in case the consumer is only interested in a small percentage of the records and still wants every record that is processed to be committed.

@sobychacko
Copy link
Contributor

@geertvb Thanks for the report. This is almost like a new feature that we need to think through. We are so close to an RC for the 3.3.0 release. I think we need to postpone these types of changes at this point in our release cycle to the next minor version (3.4.x).

@sobychacko sobychacko added this to the Backlog milestone Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants