You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by ltsallas <le...@yahoo.com> on 2013/07/02 18:26:38 UTC

FileAsyncStressReadLockLockFileTest and maxMessagePerPoll

Can you explain a little bit more this  comment  in
org.apache.camel.component.file.stress.FileAsyncStressReadLockLockFileTest? 
                // leverage the fact that we can limit to max 50 files per
poll
                // this will result in polling again and potentially picking
up files
                // that already are in progress

 Is it safer to have a bigger or smaller  maxMessagePerPoll in order to
avoid picking files that are already in process?  Is there a way to 
guaranty that a file will never be picked twice?  




--
View this message in context: http://camel.465427.n5.nabble.com/FileAsyncStressReadLockLockFileTest-and-maxMessagePerPoll-tp5735083.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: FileAsyncStressReadLockLockFileTest and maxMessagePerPoll. picking twice

Posted by Afroze <af...@gmail.com>.
Hi,

I want my camel file method to pick 5 files simultaneously and process .
using  maxMessagesPerPoll its only pick one file .Please can you help me on
this.
Can you please explain me how it works 




--
View this message in context: http://camel.465427.n5.nabble.com/FileAsyncStressReadLockLockFileTest-and-maxMessagePerPoll-tp5735083p5735174.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: FileAsyncStressReadLockLockFileTest and maxMessagePerPoll. picking twice

Posted by ltsallas <le...@yahoo.com>.
Thanks saltniight5, it works like a charm now. 

Afroze take a look at
https://fisheye6.atlassian.com/browse/camel-git/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressTest.java?hb=true 



--
View this message in context: http://camel.465427.n5.nabble.com/FileAsyncStressReadLockLockFileTest-and-maxMessagePerPoll-tp5735083p5735184.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: FileAsyncStressReadLockLockFileTest and maxMessagePerPoll. picking twice

Posted by saltnlight5 <sa...@gmail.com>.
It works for me when I use "preMove" into a staging folder first. Try this:

from("file:target/filestress?maxMessagesPerPoll=50&preMove=processing&move=archive") 



--
View this message in context: http://camel.465427.n5.nabble.com/FileAsyncStressReadLockLockFileTest-and-maxMessagePerPoll-tp5735083p5735156.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: FileAsyncStressReadLockLockFileTest and maxMessagePerPoll. picking twice

Posted by ltsallas <le...@yahoo.com>.
I ran various org.apache.camel.component.file.stress.FileAsyncStressTest
tests and when the initial files in the inbox folder are 2000 and
maxMessagesPerPoll is 50, I always get files being processed twice with all
readLock options, except rename.Mind that  I am using an additional move
option to move processed files to an archive folder.

My route looks like 


from("file:target/filestress?maxMessagesPerPoll=50&readLock=markerFile&move=archive")
.routeId("foo").noAutoStartup().threads(2)

Should these test considered successful when having files processed twice?
Should I open a jira for this?








--
View this message in context: http://camel.465427.n5.nabble.com/FileAsyncStressReadLockLockFileTest-and-maxMessagePerPoll-tp5735083p5735130.html
Sent from the Camel - Users mailing list archive at Nabble.com.