Skip to content

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

Open
@geertvb

Description

@geertvb

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions