-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Stop at end of topic/partition #848
Comments
I believe that the Kafka protocol notifies the client when the end of the partition is reached ? librdkafka and librdkafka-based clients also notify the user when the end of the partition is reached. |
Not to my knowledge. |
It tells you the latest available offset while consuming (HighWaterMark): #339, which you could use for this purpose. |
Here is an answer #2116 |
It doesn't seem to be possible to stop consuming when the end of a partition is reached.
I'm using compacted topics, and one common use-case I have is to start by reading them entirely from the beginning to the end. However, there is no easy way to stop consuming when the end is reached.
I tried a few things, but the library is not making that easy.
Basically, here is what I have to do currently:
client.GetOffset(topic, partition, sarama.OffsetNewest)
It would be awesome if Sarama provided a way to stop consuming when the end of a partition is reached and/or to be notified about it.
The text was updated successfully, but these errors were encountered: