Camel Kafka Version 2.14.3 unable to read messages

99封情书 提交于 2020-06-29 06:43:11

问题


I have a Kafka cluster(version : 0.10.1.0), with 9 brokers and 10 partitions.

I tried consuming messages from a java application using camel kafka 2.14.3. Here is my camel route

<route id="ReadFromTopic">
    <from uri="kafka:[[broker.list]]?topic=[[topic]]&amp;zookeeperHost=[[zookeeper.host]]&amp;zookeeperPort=[[zookeeper.port]]&amp;groupId=[[consumer.group]]&amp;consumerStreams=[[concurrency]]" />
    <log message="Message Read from kafka topic : [[topic]]" loggingLevel="INFO" />
    <log message=" BODY is ${body}" loggingLevel="INFO" />
</route>

Route starts fine, but isn't reading any messages.

When I tried using camel kafka 3.0.1, with route as follows, I was able to read messages

<route id="ReadFromTopic">
    <from uri="kafka:[[topic]]?brokers=[[broker.list]]&amp;groupId=[[consumer.group]]" />   
    <log message="read message : ${body}" />
</route>

Because of the dependencies I have, I can only use camel kafka 2.14.3. How can I solve this issue?


回答1:


I just found this Wiki page where the different options of Camel-Kafka depending on the version are listed.

Checkout the options for version 2.16 or older. The component documentation for Camel 2.x seems to be valid for 2.17 or newer.



来源:https://stackoverflow.com/questions/62381728/camel-kafka-version-2-14-3-unable-to-read-messages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!