You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Gabi Pi. (Jira)" <ji...@apache.org> on 2021/08/02 17:12:00 UTC
[jira] [Created] (KAFKA-13154) Misleading behaviour of
OffsetSpec.latest()
Gabi Pi. created KAFKA-13154:
--------------------------------
Summary: Misleading behaviour of OffsetSpec.latest()
Key: KAFKA-13154
URL: https://issues.apache.org/jira/browse/KAFKA-13154
Project: Kafka
Issue Type: Bug
Components: clients
Affects Versions: 2.5.1
Reporter: Gabi Pi.
When using `OffsetSpec.latest()` to get latest offsets per partition on topic, the return result represents count of offsets in topic and not the latest offset.
For example:
* For empty topic, the latest offset will be 0 (instead of -1, similar to `OffsetSpec.forTimestamp` method)
* For topic with 1 message per partition, the latest returned offset will be 1 (instead of 0)
The method described in the docs in the following way:
_Used to retrieve the latest offset of a partition_
According to this description, I think that the current behaviour is misleading.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)