-
Notifications
You must be signed in to change notification settings - Fork 21
fetchTopicOffsetsByTimestamp api implemented #206
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
Conversation
🎉 All Contributor License Agreements have been signed. Ready to merge. |
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.
Thanks!
Some changes suggested.
Also update the changelog and the readme
test/promisified/admin/fetch_topic_offsets_by_timestamp.spec.js
Outdated
Show resolved
Hide resolved
test/promisified/admin/fetch_topic_offsets_by_timestamp.spec.js
Outdated
Show resolved
Hide resolved
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.
As a part of this PR, add
@memberof RdKafka
Within admin.js, for the comment for the function OffsetSpec
CHANGELOG.md
Outdated
@@ -8,6 +8,7 @@ v1.0.0 is a feature release. It is supported for all usage. | |||
2. Add support for Node v23 pre-built binaries (#158). | |||
3. Add KafkaJS-compatible errors to promisified Admin API (createTopics, deleteGroups, deleteTopicRecords) (#159). | |||
4. Include error types within Type definitions for promisified API (#210). | |||
5. Add support for an Admin API to fetch topic offsets by timestamp (#206). |
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.
Move to changelog for 1.1.0 as discussed
}, | ||
]); | ||
|
||
const offsetsAtSpecificTimestamp2 = await admin.fetchTopicOffsetsByTimestamp(topicName, now + 150); |
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.
const offsetsAtSpecificTimestamp2 = await admin.fetchTopicOffsetsByTimestamp(topicName, now + 150); | |
const offsetsAtSpecificTimestamp2 = await admin.fetchTopicOffsetsByTimestamp(topicName, now + 250); |
(tests the 'equal' case)
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.
LGTM!
Implemented fetchTopicOffsetsByTimestamp for kafkajs and wrote tests and example for it