Hi,

If you were to delay the message for some time you could just use the
delayer.
http://camel.apache.org/delayer.html

from {file:location} 
to validate 
delay base on dynamic header
to DBLoad 
to processcomplete 


The alternative could be split the route into two separate route first one
receiving a file, validating and second doing DBLoad and processing.
If you were to detach these two routes and use activemq to exchange
information then you could take advantage of Activemq scheduler to delay
your messages.

route1:
from {file:location} 
to validate 
 <setHeader headerName="AMQ_SCHEDULED_DELAY">
   <simple>${header.delay}</simple>
</setHeader>
<to uri="activemq:queue:delayedDBLoad">

route2:
<from uri="activemq:queue:delayedDBLoad">
to DBLoad 
to processcomplete 

The messages will arrive on delayedDBLoad queue only after time specified in
AMQ_SCHEDULED_DELAY. Now the overhead of this solution 
is actually having an activemq broker, but maybe you are already using one.

I hope that helps.

Andrzej




--
View this message in context: 
http://camel.465427.n5.nabble.com/Resume-an-Endpoint-in-a-Route-tp5747151p5747212.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to