I have a file input java DSL defined route. Users are uploading file via
SFTP, so I have the readLock values set pretty high (to prevent processing
the file before the transfer is complete).

from(file:///tmp/input?readLock=changed&readLockTimeout=20000&readLockCheckInterval=10000)
 
                    .beanRef(BeanRef.UTILS, "blah")
                    .to(SUCCESS_ENDPOINT);


This works fine, but I am starting to see a backup. Users are sending in
files faster than we can process them one-by-one.  I'd like to utilize
threads to make this route process multiple files simultaneously. I modified
the route to:

from(file:///tmp/input?readLock=changed&readLockTimeout=20000&readLockCheckInterval=10000)
 
                    .threads(10)
                    .beanRef(BeanRef.UTILS, "blah")
                    .to(SUCCESS_ENDPOINT);

but that doesn't seem to do what I need. I think that it is just making the
UTILS "blah" call multi-threaded, not the file input. I saw that in Spring
DSL you can wrap your <from> tag in a <threads> tab, but what options do I
have in Java? Is this possible with java DSL? Maybe I am missing
something....

Thanks for any help you can provide.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Pulling-multiple-files-in-simultaneously-tp5772998.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to