Skip to content

Recommended way to save/load messages on producer client #4120

Answered by edenhill
asanchez1987 asked this question in Q&A
Discussion options

You must be logged in to vote

Call rd_kafka_purge(), followed by rd_kafka_flush() - the messages in queue and in-flight will fail with a PURGE.. error code. From the delivery report callback, write the messages to disk or whatever.

You would write the same fields as you originally specified to produce() or producev().

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@asanchez1987
Comment options

Answer selected by asanchez1987
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants