我有一個要求,我想在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
沒有放棄知道我跟着,你可以用一些代碼來顯示你想達到,即使它沒有運行什麼編輯您的問題嗎? –