我有一个要求,我想在Apache Camel中使用mutlicast,而不是单一路由中的单个时间。即组播中的多播。我们可以在apache骆驼中使用多个mutlicast吗?
<routeContext id="myRoute" xmlns="http://camel.apache.org/schema/spring">
<route id="myRouteId">
<from uri="activemq:queue:{{XXXX.queue}}" />
....
<multicast parallelProcessing="true">
<pipeline>
##everything working fine here
</pipeline>
<pipeline>
<multicast>
<pipeline>
<log message="Inserting in database now"></log>
<transform>
<method ref="insertBean" method="myBatchInsertion"></method>
</transform>
<choice>
<when>
<simple>${in.header.myCount} == ${properties:batch.size} </simple>
<to uri="sql:{{sql.core.insertMyQuery}}?batch=true"></to>
<log message="Inserted rows ${body}"></log>
</when>
</choice>
</pipeline>
</multicast>
</pipeline>
</multicast>
</route>
</routeContext>
有没有可能这样做? 当我试图做到这一点时,我的程序没有成功执行。 不成功的执行是多重多播的结果吗? 任何人都可以帮忙吗? 我从以下链接获得参考: http://camel.apache.org/multicast.html
没有放弃知道我跟着,你可以用一些代码来显示你想达到,即使它没有运行什么编辑您的问题吗? –