Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(topic): give the true first offset on compacted topics #1817

Merged

Conversation

AlexisSouquiere
Copy link
Collaborator

@AlexisSouquiere AlexisSouquiere commented Jun 6, 2024

Due to KAFKA-7556, the messages count is not currently accurate on compacted topics. It will never be exact but it can be improved. On compacted topics, the first offset taken into account to compute the counter is always 0, even after compaction.

Using KafkaConsumer.offsetsForTimes with 0L as timestamp instead KafkaConsumer.beginningOffsets to get the first offset solves the issue.

Before:
image

After:
image

@AlexisSouquiere AlexisSouquiere changed the title feat(ui): better precision on messages count feat(ui): better precision on messages count and partition offsets Jun 6, 2024
@AlexisSouquiere AlexisSouquiere marked this pull request as ready for review June 25, 2024 07:25
@AlexisSouquiere AlexisSouquiere changed the title feat(ui): better precision on messages count and partition offsets feat(topic): give the true first offset on compacted topics Jun 25, 2024
@tchiotludo tchiotludo merged commit 0ad541c into tchiotludo:dev Jun 27, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants