Skip to content

Default consumer offset reset policy - earliest #73

@srolija

Description

@srolija

By default Kafka Consumer has auto.offset.reset policy configured to latest. But it looks that the implementation in this connector is reverse -- unless it is configured it will start with earliest.

String offsetReset = (String) consumerProperties.get("auto.offset.reset");
if ("latest".equalsIgnoreCase(offsetReset)) {
logger.trace("Seeking to end");
consumer.seekToEnd(Collections.singletonList(tp));
} else {
logger.trace("Seeking to beginning");
consumer.seekToBeginning(Collections.singletonList(tp));

And that value is extracted from the consumer prefixed ones:

return simpleConfig.originalsWithPrefix("consumer.");

Would it make sense to make the default the same as the normal connector to keep it consistent with normal consumer groups?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions