首页 > 代码库 > C语言版kafka消费者代码运行时异常kafka receive failed disconnected

C语言版kafka消费者代码运行时异常kafka receive failed disconnected

https://github.com/edenhill/librdkafka/wiki/Broker-version-compatibility
如果使用了broker版本是0.8的话, 在运行例程时需要制定-X broker.version.fallback=0.8.x.y 否则无法运行

例如我的例子:

我的kafka版本是0.9.1

unzip librdkafka-master.zip

cd librdkafka-master

./configure && make && make install

cd examples

./rdkafka_consumer_example -b 192.168.10.10:9092 one_way_traffic -X broker.version.fallback=0.9.1

C语言版kafka消费者代码运行时异常kafka receive failed disconnected