You can stop the route in you customer bean, and start it again 15 mins later. First you need to set the routId(), then you can call the method of stopRoute and startRoute() of the CamelContext which can be injected into your customer bean.

Willem

On 3/23/11 9:20 PM, balajiu wrote:
Hello,

I have following file route in which I want to move the file only upon
successfully processing. In any event of exception I want the file to be
unmodified in the source directory.

In the event exception thrown becasue could not connect to activemq after
splitting the file , I see the file getting processed as per redelivery
attempts.

My question is in the event all redeliveriy attemps fails, I want to wait
for 15 mins before furthur processing next file. How do you handle wait time
and where do you specify in the route?

I appreciate your help.


onException(MessagingException.class).maximumRedeliveries(getExcetionsMaxRetries()).redeliverDelay(getRedeliverDelay()).handled(false).to("bean:mailNotificationProcessor");

onException(Throwable.class).handled(false).process(writeToLogFile()).to("bean:mailNotificationProcessor");

from("file://c:///servicemix///poller?filter=#FileFilter&move=//c:///servicemix///archive///${file:onlyname}-${date:now:yyyyMMdd}")
.split().method("SplitterBean",
"splitBody").to("activemq:producer").to("bean:updateQueueProcessor") .end();


Thank you,
Balaji


--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Route-question-tp4258757p4258757.html
Sent from the Camel - Users mailing list archive at Nabble.com.



--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
         http://jnn.javaeye.com (Chinese)
Twitter: willemjiang

Reply via email to