Open qq911712051 opened 3 years ago
How to create cppkafka::Message safety? Some times i get "Bus error" creating Message from make_on_owning static function. Example:
`
std::string payload("message from string"); rd_kafka_message_t* l_struct_msg = new rd_kafka_message_t; l_struct_msg->err = rd_kafka_resp_err_t::RD_KAFKA_RESP_ERR_NO_ERROR; l_struct_msg->payload = &payload[0]; l_struct_msg->len = payload.size(); l_struct_msg->key_len = 0;
cppkafka::Message cppkafka_message;
cppkafka_message = cppkafka::Message::make_non_owning(l_struct_msg);
`
the only way I can find now is to set the handle_ variable in Message and release it manually