Hello,

I'm trying to have files into a folder processed concurrently, with Spring
XML.

I've checked those links :
 - 
http://davsclaus.blogspot.com/2009/05/on-road-to-camel-20-asynchronous.html
http://davsclaus.blogspot.com/2009/05/on-road-to-camel-20-asynchronous.html 
 - 
http://davsclaus.blogspot.com/2009/05/on-road-to-camel-20-concurrency-with.html
http://davsclaus.blogspot.com/2009/05/on-road-to-camel-20-concurrency-with.html 
 -  http://camel.apache.org/async.html http://camel.apache.org/async.html 
 -  http://camel.apache.org/threading-model.html
http://camel.apache.org/threading-model.html 
and the book "Camel in Action"

I've set a default thread pool with max=10, and my route is very simple :
<camel:route id="route1">
        <camel:from uri="file:///P:/TESTS_MULTITHREAD/input" />
        <camel:log message="Filtrage ${file:name}..." loggingLevel="INFO" />
        <camel:threads poolSize="5" >
                
                <camel:delay><camel:constant>2000</camel:constant></camel:delay>
                <camel:log message="Filtrage ${file:name} OK"   
loggingLevel="INFO" />
                <camel:to uri="file:///P:/TESTS_MULTITHREAD/output" />
        </camel:threads>
</camel:route>

my environment : camel 2.8, eclipse on windows, running with Junit


*** THE PROBLEM *** :  each time a different thread is used, but not
concurrently !!
=> the logs :
[LTITHREAD/input] INFO  route1 - Filtrage
FichierTest_tresGrosFichierSansEntete_1.csv...
[ad #1 - Threads] INFO  route1 - Filtrage
FichierTest_tresGrosFichierSansEntete_1.csv OK
[LTITHREAD/input] INFO  route1 - Filtrage
FichierTest_tresGrosFichierSansEntete_1bis.csv...
[ad #2 - Threads] INFO  route1 - Filtrage
FichierTest_tresGrosFichierSansEntete_1bis.csv OK

it should be :
[LTITHREAD/input] INFO  route1 - Filtrage
FichierTest_tresGrosFichierSansEntete_1.csv...
[LTITHREAD/input] INFO  route1 - Filtrage
FichierTest_tresGrosFichierSansEntete_1bis.csv...
[ad #1 - Threads] INFO  route1 - Filtrage
FichierTest_tresGrosFichierSansEntete_1.csv OK
[ad #2 - Threads] INFO  route1 - Filtrage
FichierTest_tresGrosFichierSansEntete_1bis.csv OK


if I split my route with a seda endpoint, file polling to seda is quick but
the "threaded" part (seda to delay then file) is still not processed
concurrently

please HELP !!

--
View this message in context: 
http://camel.465427.n5.nabble.com/Concurrent-file-polling-doesn-t-work-with-Spring-XML-tp4757643p4757643.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to