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

Allow metadata object to be non-owning #73

Merged
merged 1 commit into from
May 28, 2018

Conversation

accelerated
Copy link
Contributor

Self explanatory. Also allows more consistent design to other similar handles

@accelerated accelerated force-pushed the metadata_non_owning branch from e4e89e6 to f492614 Compare May 24, 2018 19:24
@mfontanini
Copy link
Owner

Is there a use case for this besides consistency? I'll merge it regardless but I'm just curious.

@mfontanini mfontanini merged commit f543810 into mfontanini:master May 28, 2018
@accelerated
Copy link
Contributor Author

I want to do something similar to what you're doing with your message dr callback...where I create/own the metadata object and the just pass a reference during dr callback along with the message (I'm not passing at all the kafka handle, just its metadata for user-abstraction reasons). Creating the metadata is probably quite resource intensive as librdkafka has to gather all that info for all topics. So I'd rather do it once and then cache it until some "event occurs" like a reassigment. Anyway that's the jist of it.
Also I may have a need for an empty metadata object.

@accelerated accelerated deleted the metadata_non_owning branch May 28, 2018 20:51
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