core-2.17.0.redhat-630187 |未设置消息密钥或分区密钥

kmb7vmvb  于 2021-06-07  发布在  Kafka
关注(0)|答案(0)|浏览(220)

我正试图用kafka部署一个简单的camel路由,将一个kafka主题使用的消息路由到jboss fuse上的另一个主题,但是我得到了错误消息“org.apache.camel.camel-core-2.17.0.redhat-630187 | no message key or partition key set”。这是蓝图dsl中的 Camel 路线

<?xml version="1.0" encoding="UTF-8"?>
<blueprint
    xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="
      http://www.osgi.org/xmlns/blueprint/v1.0.0
      http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">

    <camelContext xmlns="http://camel.apache.org/schema/blueprint">
      <route>
        <from id="_from1" uri="kafka:localhost:9092?topic=test1&amp;groupId=1"/>
          <to uri="kafka:localhost:9092?topic=test2&amp;groupId=1&amp;serializerClass=org.apache.kafka.common.serialization.StringSerializer"/>
      </route>
    </camelContext>

</blueprint>

有人知道如何解决这个问题吗?谢谢

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题