Why is Microsoft's new kafkanet Kafka 0.8 consumer not working with a 0.9 broker?

Viewed 243

According to @Lundahl “The 0.9 broker will work with ... the 0.8 consumer “ Is kafka consumer 0.9 backward compatible?

However, we are not finding that to be the case for the newly released https://github.com/Microsoft/Kafkanet library. It was originally written for Kafka 0.8.x and we would like to see it work with Kafka 0.9.x. We were able to get the kafkanet producer working with one minor code change. However the kafkanet consumer, is proving more difficult.

APPROACH 1: Is there anything in particular a 0.8 consumer needs to do to declare itself as a 0.8 consumer so the 0.9 broker can properly interact with it?


APPROACH 2: Alternately, any suggestions to upgrade the protocol and convert the code to a 0.9 consumer? We are getting an error on the following line of code in the FetchResponse.cs file where 0.8 returns a 1 but 0.9 returns 0 for dataCount.

                size = reader.ReadInt32();
                correlationId = reader.ReadInt32();
                dataCount = reader.ReadInt32();
                var data = new TopicData[dataCount];

https://cwiki.apache.org/confluence/display/KAFKA/A+Guide+To+The+Kafka+Protocol#AGuideToTheKafkaProtocol-FetchAPI

Any other advice to get the kafkanet consumer working with 0.9 would be appreciated.

Thanks,

-John

0 Answers
Related