spring - int-ftp:inbound-channel-adapter fetch in sequential order? -


how can make int-ftp:inbound-channel-adapter fetch files in order created on remote system ?

for example :

file1 - 15:31:01 file2 - 15:32:02 file3 - 15:33:03 file4 - 15:34:04 file5 - 15:35:05 

assume application down 5 minutes, in time 5 files got created, once restart/redeploy application, int-ftp:inbound-channel-adapter has fetch files local system in order created(timestamp).

please suggests.

regards, ravi

the <int-ftp:inbound-channel-adapter> has comparator attribute:

<xsd:attribute name="comparator" type="xsd:string">     <xsd:annotation>         <xsd:documentation><![cdata[         specify comparator used when ordering files. if none provided,         order determined java.io.file implementation of comparable.         ]]></xsd:documentation>     </xsd:annotation> </xsd:attribute> 

it used internal queue:

public filereadingmessagesource(comparator<file> receptionordercomparator) {     this.tobereceived = new priorityblockingqueue<file>(             default_internal_queue_capacity, receptionordercomparator); } 

after ftpinboundfilesynchronizer pulls remote files local dir before poller starts pick them message flow.


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -