-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Adding a produce() flag to free msg_opaque (like RD_KAFKA_MSG_F_FREE) #3192
Comments
Why can't you free it in the delivery report callback? |
We could, but will it be called in all cases, including when the |
Actually I could handle this by keeping track of inflight |
You can call purge() to force delivery callbacks for queued messages.
Den mån 28 dec. 2020 17:42Arnaud Le Blanc <notifications@github.com> skrev:
… We could, but will it be called in all cases, including when the
rd_kafka_t is destroyed while a message is still queued ?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#3192 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEAFPSZM3BKFDOZTDQMWGTSXCYQTANCNFSM4VMBW3GA>
.
|
Oh, this is perfect! Thanks :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
In bindings for memory managed languages, freeing a
msg_opaque
is tricky.Adding a flag to
rd_kafka_produce()
that allows librdkafka to free themsg_opaque
, asRD_KAFKA_MSG_F_FREE
does for the payload, would be very helpful.The flag could be named
RD_KAFKA_MSG_OPAQUE_F_FREE
, and passing it tord_kafka_produce()
and variants would causerd_kafka_msg_destroy()
to free->rkm_opaque
.Would you accept a PR with this change?
Checklist
e116a873bbe395b78d3b40171afa9c68dc93da78
The text was updated successfully, but these errors were encountered: