Skip to content

Conversation

Fischiii
Copy link

Added the possibility to access the local cached offsets of a consumer using rd_kafka_get_watermark_offsets as always fetching the offsets was to slow for our use case.

If there is already a way to access the currently cached offsets ignore this PR and please point me in the right direction.

@kenneth-jia
Copy link
Contributor

Hi, @Fischiii
Thank you for pointing it out!
Instead of creating new interfaces (e.g. beginningOffsetsCached/endOffsetsCached), maybe we could reuse the existed ones.
I'll refine the beginningOffsets(..., timeout)/endOffsets(..., timeout), to make them return cached offsets if timeout is 0.
(but please wait a few more days for the PR, -- due to my access limit)

@Fischiii
Copy link
Author

Fischiii commented Jul 5, 2023

@kenneth-jia I applied your suggested changes. I think it is a better solution than what I first proposed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants