flier / tokio-kafka

Asynchronous Rust client for Apache Kafka
Apache License 2.0
31 stars 1 forks source link

message: RECORD_HEADER_SIZE is wrong #8

Closed polachok closed 6 years ago

polachok commented 6 years ago

encode_message() writes message size, but this space is not accounted in Message::size(), leading to wrong MessageSize::size() => smaller reserved size => panic on put_slice()

I'm not sure if MSG_SIZE should be added to RECORD_HEADER_SIZE or directly in Message::size() method. Looking at proto doc, they consider size not a message attribute.

polachok commented 6 years ago

My analysis seems wrong here, investigating further.