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

Include fetched offset metadata retrieved with admin.fetchOffsets #389

Merged
merged 2 commits into from
Jun 13, 2019

Conversation

JaapRood
Copy link
Collaborator

Kafka supports a nullable string of metadata to be stored with a committed offset. KafkaJS actually supports this with it's protocol definitions, but admin.fetchOffsets filters it out just before returning the retrieved offsets to us.

@JaapRood
Copy link
Collaborator Author

As you might see from the tests: it only asserts metadata of null is forwarded. While consumerGroup will pass on any metadata and write it, that method isn't exposed anywhere at the moment. admin.setOffsets actually spawns a Consumer and relies on the auto commit mechanism to commit a resolved offset after seeking to it. See #378.

@Nevon Nevon self-requested a review June 13, 2019 09:45
@Nevon
Copy link
Collaborator

Nevon commented Jun 13, 2019

Can you make sure to update the return type for fetchOffsets as well? https://github.com/tulios/kafkajs/blob/master/index.d.ts#L272

EDIT: Being handled in #390

@Nevon Nevon merged commit 0ff0d40 into tulios:master Jun 13, 2019
tulios added a commit that referenced this pull request Jun 13, 2019
@JaapRood JaapRood deleted the feature/include-offset-metadata branch June 13, 2019 09:54
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