※ XML配置可以访问apache camel中的Kafka属性
There is no kafka and spring XML configuration is available anywhere
<camelContext xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="direct:SpringXMLRouteStart" />
<setHeader headerName="CamelHttpMethod">
<constant>GET</constant>
</setHeader>
<!-- To printout the routing message on the IDE console -->
<to uri="http://localhost:8080/v1/get/WGS/inboundCMMessage1" />
</route>
<route>
<from uri="http://localhost:8080/v1/get/WGS/inboundCMMessage1" />
<to uri="kafka://localhost:9092?topic=customtopic&zookeeperHost=localhost:2181" />
</route>
</camelContext>
..................我的错误..................
org.xml.sax.SAXParseException: The reference to entity "zookeeperHost" must end with the ';' delimiter.
提前致谢
1条答案
按热度按时间dsf9zpds1#
由于您使用的是XML,因此不能像使用Java DSL那样在路由URI中使用'&',请执行以下操作: