title: Apache Camel - Copying a large file into a consumer folder
body: <p>I have a route that expects that various files will be copied into an <strong>incoming folder</strong>. The route will proceed to move these files into a temp folder where it will do other stuff. The route is as follows: </p>
  
  <pre><code>       &lt;route id="incoming" &gt;
              &lt;from uri="file://my/path/incoming"/&gt;
              &lt;to uri="file://my/path/incoming/temp"/&gt;
          &lt;/route&gt;
  </code></pre>
  
  <p>The issue is that these files may be quite large. Lets say 1Gb. In order to copy this file in to the incoming folder it may take lets say 10 seconds. During these 10 seconds the Consumer polls the directory and an exception is thrown since the partial file is still being copied. What workaround could I use?</p>
  
  <p>I have used readLock all strategies (primarily changed) but I get an exception:</p>
  
  <pre><code>(The process cannot access the file because it is being used by another process)
  </code></pre>
  
  <p>The modified uri is as follows: </p>
  
  <pre><code>&lt;from uri="file://my/file/path?readLockCheckInterval=3000&amp;amp;readLock=changed"/&gt;
  </code></pre>
  
  <p>Still no luck though</p>