camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jackkirsten <>
Subject waitForTaskToComplete & concurrentConsumers
Date Sun, 21 Jun 2015 17:45:49 GMT
Hi, I have an index file that lists a list of file names and each file needs
to be processed asynchronously. So I have a camel context with quartz timer
scheduled to trigger at X time (once a day).  Then within that route, I have
a split logic to split the file name list and each file is sent to SEDA
queue for asynchronous processing.  All works well so far.  Now I want to
find out when all files got processed.  So I tried this:

  <to uri=&quot;seda:fileProcessing?&lt;b>waitForTaskToComplete=Always*"/>

With this setup, each file processing gets sequential and I lose the
asynchronous behavior and it slows down the overall processing now. On the
consumer side, I have set the concurrentConsumers=5 but still it behaves

Question:  If I set waitForTaskToComplete=Always in the producer side and I
set concurrentConsumers=5, will that make the overall processing behavior
sequential though I set concurrentConsumers > 0?  It seems like
waitForTaskToComplete takes precedence and nullfies the concurrentConsumers

How do I achieve async behavior by processing all files in parallel but I
want to wait for all SEDA queue processing is done before I say in the
quartz route that all processing is fully done for that execution?

Please provide some thoughts.


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message