camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hadrian Zbarcea <>
Subject Re: File consumer - waiting for it to start
Date Sat, 04 Feb 2012 00:04:13 GMT
Babak's link should help. That is useful mostly when you run manually 
using something like camel:run. Another option is to wait for an event 
after context.start() and at the end of your processing trigger the 
event. That way your wait time will be no longer than needed.


On 02/03/2012 06:47 PM, Babak Vahdat wrote:
> Hi
> Starting Camel context (context.start()) does *not* block the main thread.
> However when you do a Thread.sleep() you give a chance to the daemon thread
> to run the file consumer polling inside, eg 1 polling round, and as it's a
> daemon thread it doesn't block the JVM from exiting so that your JVM exits
> at the end!
> You can take a look at [1] to see how you can keep your Camel standalone
> application running.
> [1]
> Babak
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

Hadrian Zbarcea
Principal Software Architect
Talend, Inc

View raw message