camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sorin Silaghi <>
Subject random sort in FTP pooling
Date Tue, 30 Aug 2011 13:25:31 GMT
Hi all,

              We wrote a read lock strategy that allows us to use multiple
FTP consumers for the same directory. The problem we are facing now is that
when using multiple consumers they all go for the same file in the list. To
solve this we would need FTP consumers to go after a random file from the

              I wrote a Comparator that returns a random value and I thought
we could use it to sort the file list. I know it's not the most elegant
solution but it works fine with Collections.sort(). The problem is Camel
doesn't seem to use it. It doesn't even pick it up actually.

              My question is what would be the best way to do this (any
other suggestions besides the random comparator) and anybody has any idea
why this wouldn't work?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message