doujiang24 / lua-resty-kafka

Lua kafka client driver for the Openresty based on the cosocket API
BSD 3-Clause "New" or "Revised" License
801 stars 274 forks source link

Errcode and offset field of producer response are both -1 #20

Open paidp opened 8 years ago

paidp commented 8 years ago

When I connected lua-resty-kafka to 0.9.0.1, the errocode and offset field in the response are both -1. There will be error message in nginx error.log (line 258, producer.lua)

After I change line 153 in producer.lua as follows, everything works fine. if errcode == 0 or errocode == -1 then

Is there any plan to upgrade the protocol implementation to support Kafka api version 2?

BTW, @doujiang24 great project. Thanks

doujiang24 commented 8 years ago

@paidp Thanks for your report, are you sure everything works fine? can you consume the data from kafka. according to this document: https://cwiki.apache.org/confluence/display/KAFKA/A+Guide+To+The+Kafka+Protocol#AGuideToTheKafkaProtocol-ErrorCodes -1 means An unexpected server error

Anyway, I'll deep into this problem as soon as possible. yeah, this library is developed base kafka 0.8.1. I'll upgrade it, but I don't have so much time for now (just back after a long holiday)