Hi Svante, This is indeed an issue with the protocol definition of ConsumerMetadataResponse. Do you think this issue is fixed in the following JIRA?
https://issues.apache.org/jira/browse/KAFKA-1437 Guozhang On Mon, May 12, 2014 at 1:10 AM, svante karlsson <s...@csi.se> wrote: > I'm writing (yet another) C++ binding for kafka and I'm curious on the > encoding in relation to error-code != 0 > > There seems to be a discrepancy as to how to decode messages in presence of > errors. > > ConsumerMetadataResponse error_code !=0 -> no more data should be decoded. > > in all others we continue parsing of the rest of the message. Is this > assumption correct? > > ie. > > ProduceResponse... offset should always be decoded > > FetchResponse highwater_mark_offset, message_set_size and > corresponding message should be decoded (most likely 0 size) > > OffsetResponse: offsets array should be decoded (guessing 0 size or > NULL) > > MetadataResponse topic_data::error-code and partition-data::error_code, > the rest of the message should be decoded. > > > /svante > -- -- Guozhang