rust-rdkafka icon indicating copy to clipboard operation
rust-rdkafka copied to clipboard

Create non-copy producer

Open fede1024 opened this issue 8 years ago • 2 comments

At the moment the producer will provide a copy of the message to the underlying librdkafka client. Rust-rdkafka should provide a method that takes ownership of the message and gives it in non-copy mode to librdkafka, saving one allocation/free.

fede1024 avatar Jun 29 '17 21:06 fede1024

This appears to have been addressed by 56366ae8c1443318aa4036097c6fbc879f93e238.

benesch avatar Nov 09 '19 19:11 benesch

Oh, no, I misunderstood. We're still asking librdkafka to make a copy here: https://github.com/fede1024/rust-rdkafka/blob/47a5cc7442e4eb8815d6cfda79ae87aa9aaf2fbe/src/producer/base_producer.rs#L347.

benesch avatar Nov 10 '19 04:11 benesch