mfontanini / cppkafka

Modern C++ Apache Kafka client library (wrapper for librdkafka)
BSD 2-Clause "Simplified" License
587 stars 207 forks source link

Unable to set/use BackgroundEventCallback #268

Closed 196884 closed 3 years ago

196884 commented 3 years ago

The signature specifies a cppkafka::Event as the second argument, but that object is not copyable (implicitly deleted, as it uses an std::unique_ptr which itself is not copyable...). Would it make sense to pass a const cppkafka::Event& instead?

mfontanini commented 3 years ago

That callback takes an Event so you should be able to move it. e.g. events.push_back(move(event));

196884 commented 3 years ago

Arf, yes, thanks!