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

查看:26
本文介绍了Camel Kafka 版本 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.

当我尝试使用camel kafka 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>

由于我的依赖关系,我只能使用camel 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 或更早版本的选项.Camel 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.

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

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