![](/img/trans.png)
[英]Apache Camel (JBoss Fuse) - how to unzip a file from a MQ route?
[英]Running a loop continuously using camel route on jboss fuse
需要從socket()讀取數據,使用ibatis解析並寫入數據庫。這必須連續進行。不確定如何連續運行此過程。 想過使用駱駝循環。但是看起來我們需要提到循環計數。
<route id="vts-data">
<from uri="timer://runOnce?repeatCount=1" />
<doTry>
<loop>
<to uri="bean:vtsProcessor?method=extractLocations" />
<log message="Details List is : ${body}" />
</loop>
<choice>
<when>
<simple>${body.size} == 0</simple>
<log message="List is null ${body}" />
</when>
<otherwise>
<to uri="mybatisPromis:insertLocationData?statementType=SelectList" />
<log message="Details List is : ${body}" />
<choice>
<when>
<simple>${body.size} == 0</simple>
<log message="Details List is null : ${body}" />
</when>
<otherwise>
<log message="Details List is : ${body}" />
</otherwise>
</choice>
</otherwise>
</choice>
<doCatch>
<exception>java.lang.Exception</exception>
</doCatch>
<doFinally>
<to uri="log:body" />
</doFinally>
</doTry>
</route>
我是駱駝和融合的新手。 想到了使用工作線程來連續運行該進程,但不走運。 需要一些指導以優化方法。
駱駝路線提供“始終運行的過程”。 只需安排組件和EIP即可滿足您的要求。
推薦的方法是從“ from”中的套接字讀取
如果不是#1,則應查看使用pollingConsumer模式。.計時器運行..輪詢套接字端點..然后堅持使用ibatis
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.