You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Claudio R <us...@yahoo.com.br> on 2015/08/12 22:29:25 UTC

Is there any way to limit the size of the FTP listing each poll of FTPConsumer?

Hi,
I'm using the FTPConsumer. In FTP, each xml file has the name nyyyyMMddHHmm.xml, where yyyy is the year, MM is the month, dd is the day, HH is the hour and mm is the minute.The processing of the file uses the file name sorting in descending order. For a list of files: n201508110801.xml, n201508110802.xml, n201508110803.xml. The n201508110803.xml file is the first file to be processed, the n201508110802.xml file will be the second and n201508110801.xml file is the last file being processed. Consider that the process has started and the processing each file takes 10 minutes (slow processing). After 20 seconds of processing, it is available on the FTP the n201508110804.xml file.
I would like the n201508110804.xml file to be processed shortly after n201508110803.xml file. In my tests, the n201508110804.xml file is processed only after processing the file n201508110801.xml.
Is there any way of the FTPConsumer catch a new FTP listing after each file processing?  
Is there any way to limit the size of the FTP listing each poll of FTPConsumer? (as top in select of database)

Re: Is there any way to limit the size of the FTP listing each poll of FTPConsumer?

Posted by Claus Ibsen <cl...@gmail.com>.
See the maxMessagesPerPoll option

On Wed, Aug 12, 2015 at 10:29 PM, Claudio R <us...@yahoo.com.br> wrote:
> Hi,
> I'm using the FTPConsumer. In FTP, each xml file has the name nyyyyMMddHHmm.xml, where yyyy is the year, MM is the month, dd is the day, HH is the hour and mm is the minute.The processing of the file uses the file name sorting in descending order. For a list of files: n201508110801.xml, n201508110802.xml, n201508110803.xml. The n201508110803.xml file is the first file to be processed, the n201508110802.xml file will be the second and n201508110801.xml file is the last file being processed. Consider that the process has started and the processing each file takes 10 minutes (slow processing). After 20 seconds of processing, it is available on the FTP the n201508110804.xml file.
> I would like the n201508110804.xml file to be processed shortly after n201508110803.xml file. In my tests, the n201508110804.xml file is processed only after processing the file n201508110801.xml.
> Is there any way of the FTPConsumer catch a new FTP listing after each file processing?
> Is there any way to limit the size of the FTP listing each poll of FTPConsumer? (as top in select of database)



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2nd edition: http://www.manning.com/ibsen2