Apache Camel Batch FTP Upload then disconnect
<p>My use case is to poll a local directory for a list of new files periodically, and then upload them to a FTP server in 1 connection. The Camel route is defined in Spring XML as follows:</p>

<pre><code>&lt;route&gt;
  &lt;from uri="file:data/inbox?noop=true&amp;amp;delay=1000&amp;amp;maxMessagesPerPoll=3" /&gt;
  &lt;to uri="ftp:uid:xxxxx@host:21/data?disconnect=false"/&gt;
&lt;/route&gt;
</code></pre>

<p>The route is functioning well, except that the FTP connection will retain connected until the FTP server timeout my connection. I hope to reuse the same connection to upload a batch of files and then close the connection immediately when the last file in the batch completed the upload. How can achieve this in Camel?</p>