-
-
Notifications
You must be signed in to change notification settings - Fork 527
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
Add the functionality to fetch topic offsets by timestamp #604
Conversation
fc8dd38
to
0db387c
Compare
Interesting the proposal! Adding Combining it with I think it's obvious that it implies consumption from a message with a certain timestamp, knowing Kafka it would try to resolve the offset of the first message with that timestamp. But the question is: when does it do that? Is it after it 'subscribed', once, at the beginning? But then what about when a rebalance happens? Does it resolve back to that offset then as well, or continues where it left off with assignments it gets re-assigned, or does it only apply to new assignments only, etc.? Or perhaps it works like a fallback, for when the offset we're trying to consume is out of range, basically like Rather the adding |
Edited: It seems my old comments were wrong. Better to just run a script with |
I think it's worth considering how this fits in with #580. We want to deprecate I would suggest that we split the discussion into two separate parts. Everyone is in complete agreement on adding this functionality to the admin interface, so let's get that change merged first in the scope of this PR. Then we can discuss if and how to allow for that use case within the consumer. I think that discussion can be had in #580. Sound good? |
@Nevon Sounds fair, I'll edit the PR later. |
0db387c
to
57d3012
Compare
admin.resetOffsetsByTimestamp
to set consumer group's offsets by timestamp
2830638
to
3e46e63
Compare
Hmm, some unrelated tests were not stable. |
It's the holiday season over here, so I don't think I'll have the opportunity to properly review this until at least the 27th. Sorry for the inconvenience. |
admin.resetOffsetsByTimestamp
to set consumer group's offsets by timestamp
As I'm more familiar with Kafka now, this use-case can be achieved by command line script provided by Kafka:
|
Hello, will this be finished as I'm also interested in this functionality? |
Whats going on guys? Really need this functionality as building graphs dashboard and need to stream in 20minutes historical data + stream now . |
The functionality should be ready to use. Please tell me if anything more needs to change. |
Hi @liukun, Is this feature available in any pre-release? I installed the latest beta but this feature is not there. Can you please let me know. Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments.
1121467
to
b837042
Compare
b837042
to
ae8645f
Compare
Cool, let's get this merged. Thanks for the contribution, and sorry it took so many back and forth's. I see one thing I wanna tighten up in the type definitions, but I can do that separately instead. |
… sola instancia de kafka. Idea de filtro de mensajes por rango de timestamps usando datepicker segun este pr tulios/kafkajs#604
Fixed #329, similar to #525 but with different naming and tests.
Supportsconsumer.subscribe({ topic: 'test-topic', fromTimestamp: 1576731939876 })
.Edited: reverted
consumer.subscribe
changes and limits the functionality withinadmin
.