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

rd_kafka_offsets_store with rd_kafka_commit does not preserve metadata on NULL #4570

Closed
6 of 7 tasks
mensfeld opened this issue Dec 28, 2023 · 1 comment
Closed
6 of 7 tasks

Comments

@mensfeld
Copy link

I use rd_kafka_offsets_store with metadata that is suppose to be stored based on #4084

Then I invoke rd_kafka_commit with no tpl (NULL) and I would expect the metadata to be stored alongside the offsets but it is empty. Only passing explicit tpl to rd_kafka_commit stores the metadata.

I find this behaviour weird because auto commit stores the offsets, so the issue is only with rd_kafka_commit.

How to reproduce

I use a custom code for the Ruby bindings (maintainer here) but the steps are as follows:

  1. I create a TPL with metadata
  2. I store the offsets
  3. If I invoke rd_kafka_commit with the TPL (not null) OR leave it to auto-commit metadata is saved back in Kafka alongside the offsets
  4. If I store the offsets via rd_kafka_offsets_store and then rd_kafka_commit with NULL, offsets are not preserved.

The docs indicate:

If \p offsets is NULL the current partition assignment will be used instead.

However one does not contradict the other. Metadata IMHO should still be stored and saved on offset commit with NULL as expected. I find that behaviour maybe not erroneous per se but def inconsistent or unexpected.

Please provide the following information:

  • librdkafka version (release number or git tag): 2.3.0
  • Apache Kafka version: cp-kafka with docker tag to v7.5.3
  • librdkafka client configuration: enable.auto.offset.store set to false
  • Operating system: Ubuntu 22.04.3 LTS
  • Logs behave as expected, the value is not bein passed.
  • Irrelevant - all good on broker side
  • Critical issue - No
@mensfeld
Copy link
Author

Closing. It was my mistake. Please accept my sincere apologies 🙏

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

No branches or pull requests

1 participant