Skip to content

default partition offset = 0 breaks when first log segment is rolled #175

Closed
@dpkp

Description

@dpkp

When not using auto-commit, the consumer object will set the default offset to 0 for all partitions:
https://github.com/mumrah/kafka-python/blob/master/kafka/consumer.py#L119

This is an absolute offset and will only work so long as the first message is still in an active log segment. As soon as it gets rolled by the server, the default consumer will no longer be able to fetch messages without a manual seek.

I think we should probably query the server for the smallest valid offset rather than assuming offset 0 is still there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions