title: Apache Camel route hangs when file is deleted during processing
body: <p>The program i am trying to build, consumes files on a Windows file share using Camel 2.18.5 and other programs occasionally add/modify/delete files in the share folder.</p>
  
  <p>Building a simple test route </p>
  
  <pre><code>        from("file:///C:/Temp/from?readLock=changed&amp;readLockCheckInterval=10000&amp;readLockTimeout=0")
              .routeId("SimpleFileRoute")
              .to("file:/C:/Temp/to");
  </code></pre>
  
  <p>then placing a file, test.txt, in the from folder, waiting for the route to make a test.txt.camelLock file and then manually deleting test.txt before the readLockCheckInterval has passed, will cause the route to hang indefinitely without throwing an exception or processing any other files.</p>
  
  <p>"changed" seems to be the only appropriate readLock for the situation.</p>
  
  <p>Is there any way to make the route throw an exception, clean up the lock file and continue consuming files?</p>
  
  <p>Edit: The stack trace of the thread that seems to be the route is this:</p>
  
  <pre><code>Daemon Thread [Camel (camel-1) thread #2 - file:///C:/Temp/from] (Suspended)    
  Thread.sleep(long) line: not available [native method]  
  FileChangedExclusiveReadLockStrategy.sleep() line: 104  
  FileChangedExclusiveReadLockStrategy.acquireExclusiveReadLock(GenericFileOperations&lt;File&gt;, GenericFile&lt;File&gt;, Exchange) line: 90    
  GenericFileRenameProcessStrategy&lt;T&gt;(GenericFileProcessStrategySupport&lt;T&gt;).begin(GenericFileOperations&lt;T&gt;, GenericFileEndpoint&lt;T&gt;, Exchange, GenericFile&lt;T&gt;) line: 64    
  GenericFileRenameProcessStrategy&lt;T&gt;.begin(GenericFileOperations&lt;T&gt;, GenericFileEndpoint&lt;T&gt;, Exchange, GenericFile&lt;T&gt;) line: 37  
  FileConsumer(GenericFileConsumer&lt;T&gt;).processExchange(Exchange) line: 362    
  FileConsumer(GenericFileConsumer&lt;T&gt;).processBatch(Queue&lt;Object&gt;) line: 223  
  FileConsumer(GenericFileConsumer&lt;T&gt;).poll() line: 187   
  FileConsumer(ScheduledPollConsumer).doRun() line: 174   
  FileConsumer(ScheduledPollConsumer).run() line: 101 
  Executors$RunnableAdapter&lt;T&gt;.call() line: 511   
  ScheduledThreadPoolExecutor$ScheduledFutureTask&lt;V&gt;(FutureTask&lt;V&gt;).runAndReset() line: 308   
  ScheduledThreadPoolExecutor$ScheduledFutureTask&lt;V&gt;.access$301(ScheduledThreadPoolExecutor$ScheduledFutureTask) line: 180    
  ScheduledThreadPoolExecutor$ScheduledFutureTask&lt;V&gt;.run() line: 294  
  RejectableScheduledThreadPoolExecutor(ThreadPoolExecutor).runWorker(ThreadPoolExecutor$Worker) line: 1142   
  ThreadPoolExecutor$Worker.run() line: 617   
  Thread.run() line: 745  
  </code></pre>