1.camel多条路径
<camelContext errorHandlerRef="errorHandler" xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="direct:a"/>
<choice>
<when>
<xpath>$foo = 'bar'</xpath>
<to uri="direct:b"/>
</when>
<when>
<xpath>$foo = 'cheese'</xpath>
<to uri="direct:c"/>
</when>
<otherwise>
<to uri="direct:d"/>
</otherwise>
</choice>
</route>
</camelContext>
2.camel实现管道过滤
<route>
<from uri="activemq:SomeQueue"/>
<bean ref="foo"/>
<bean ref="bar"/>
<to uri="activemq:OutputQueue"/>
</route>
<camelContext errorHandlerRef="errorHandler" xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="direct:a"/>
<multicast>
<to uri="direct:b"/>
<to uri="direct:c"/>
<to uri="direct:d"/>
</multicast>
</route>
</camelContext>
<camelContext id="scheduler" xmlns="http://camel.apache.org/schema/blueprint">
<route>
<from uri="timer://foo3?fixedRate=true&period=60000" />
<to uri="bean:orderScheduler?method=scheduler"/>
<!--设置body的值-->
<transform>
<constant>Bye World</constant>
</transform>
<to uri="mock:test"/>
<!--输出日志-->
<to uri="log:com.javarticles?level=INFO&showAll=true"/>
</route>
</camelContext>
5.camel标签
<aggregate/><!--积聚--><aop/>
<bean/>
<convertBodyTo type=""/>
<delay/><!--延迟-->
<doCatch/>
<doFinally/>
<doTry/>
<dynamicRouter/>
<enrich/><!--丰富-->
<filter/>
<intercept/>
<loadBalance/>
<loop/>
<marshal/><!--编排-->
<multicast/><!--组播-->
<pipeline/><!--管道-->
<policy ref=""/><!--政策-->
<process ref=""/>
<removeHeader headerName=""/>
<rollback/>
<sort/>
<split/>
<stop/>
<threads/><!--螺纹-->
<throttle/><!--节流阀-->
<transform/><!--转换-->
<inOnly/><!---->
<unmarshal/><!--编码解码-->
<validate/><!--验证-->
<wireTap/><!--窃听-->