getLatestOffset #1663
-
Hello, I stumbled over the problem, that KafkaTestUtils.getCurrentOffset() sometimes shows the offset=0 although there exists several records on a partition and I expect the offset to be 1. The offset value depends on the amount of commited messages and on the value auto.offset.reset. So I think it might be useful, if the class KafkaTestUtils would get a static method to show the latest offset like getCurrentOffset(). |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Looks like there is some misunderstanding what is What you are asking would sound more like a "number of records in the partition" to really align it properly with the |
Beta Was this translation helpful? Give feedback.
-
See this stack overflow answer for how to get the end offsets. We could add helper methods to the KTU. |
Beta Was this translation helpful? Give feedback.
#1666