骆驼卡夫卡版本2.14.3无法读取消息 [英] Camel Kafka Version 2.14.3 unable to read messages

查看:60
本文介绍了骆驼卡夫卡版本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]]&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.

当我尝试使用骆驼卡夫卡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]]&amp;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.x的组件文档似乎有效适用于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.

这篇关于骆驼卡夫卡版本2.14.3无法读取消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆