【问题标题】:Camel Kafka Version 2.14.3 unable to read messagesCamel Kafka 版本 2.14.3 无法读取消息
【发布时间】:2020-06-16 21:53:02
【问题描述】:

我有一个 Kafka 集群(版本:0.10.1.0),有 9 个代理和 10 个分区。

我尝试使用骆驼 kafka 2.14.3 来使用来自 java 应用程序的消息。这是我的骆驼路线

<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>

路由启动正常,但没有读取任何消息。

当我尝试使用camel kafka 3.0.1,路由如下,我能够阅读消息

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

因为我有依赖,只能用camel kafka2.14.3。我该如何解决这个问题?

【问题讨论】:

    标签: java maven apache-kafka apache-camel


    【解决方案1】:

    我刚刚找到this Wiki page,其中列出了 Camel-Kafka 的不同选项,具体取决于版本。

    查看 2.16 或更早版本的选项。 component documentation for Camel 2.x 似乎对 2.17 或更高版本有效。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-10-08
      • 2021-03-15
      • 2018-01-12
      • 2021-04-13
      • 2015-01-26
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多