Reputation: 3907
Lets assume that I have a File Consumer that polls a directory every 10 seconds and does some sort of processing to the files it has found there.
This processing may take 40 seconds for each file. This means that during that interval the Cosumer will poll the directory again, and start another similar process?
Is there any way I can avoid that, and not allow the Consumer to poll if the previous poll has not finished?
Upvotes: 0
Views: 327
Reputation: 55585
The file consumer is single threaded so it will not poll while it already process files.
When the consumer finishes it will delay for 10s before polling again. This is controlled by useFixedDelay
option which you can read more about in the JDK ScheduledExecutorService
which is used by Camel as the scheduler.
Upvotes: 3