confluent-kafka-python
confluent-kafka-python copied to clipboard
Implement tail (relative) offset
Description
In golang implementation OffsetTail is available which returns the logical offset relativeOffset from current end of partition. It would be great to have this also available in python.
https://github.com/confluentinc/confluent-kafka-go/blob/v2.2.0/kafka/offset.go#L120
OFFSET_END?
https://docs.confluent.io/platform/current/clients/confluent-kafka-python/html/index.html#offset
Hi, this is different. OFFSET_END will start consuming from the point on consumer is subscribed. OffsetTail allows you to specify relative ofset from the current end of partition. E.g. let us say we have last message committed at offset 30 and we set OffsetTail to 2. This will consume from offset 29 (last two messages).