骆驼卡夫卡版本2.14.3无法读取消息
我有一个Kafka集群(版本:0.10.1.0),具有9个代理和10个分区.
I have a Kafka cluster(version : 0.10.1.0), with 9 brokers and 10 partitions.
我尝试使用骆驼kafka 2.14.3
消耗来自Java应用程序的消息.这是我的骆驼路线
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]]&zookeeperHost=[[zookeeper.host]]&zookeeperPort=[[zookeeper.port]]&groupId=[[consumer.group]]&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.
当我尝试使用骆驼卡夫卡3.0.1
时,如下所示,我能够读取消息
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]]&groupId=[[consumer.group]]" />
<log message="read message : ${body}" />
</route>
由于我具有依赖性,因此只能使用骆驼kafka 2.14.3
.我该如何解决这个问题?
Because of the dependencies I have, I can only use camel kafka 2.14.3
. How can I solve this issue?
我刚刚发现该Wiki页面,其中列出了Camel-Kafka的不同选项,具体取决于版本.
I just found this Wiki page where the different options of Camel-Kafka depending on the version are listed.
检出2.16或更高版本的选项. 组件文档似乎有效适用于2.17或更高版本.
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.