我们可以在Spring XML配置文件中使用apache camel设置Kafka属性吗

时间:2019-05-20 12:47:07

标签: xml spring-boot apache-kafka apache-camel

XML配置是否可以访问Apache骆驼中的kafka属性

Magick::Image temp;
size_t total_frames = 0;

temp.ping("animation.gif[-1]");
total_frames = temp.scene() + 1;

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>

预先感谢

1 个答案:

答案 0 :(得分:0)

由于您使用的是XML,因此无法像在Java DSL中那样在路由URI中使用“&”,因此:

&amp;zookeeperHost=localhost:2181