Hi

You can use the composed message processor eip, and enable parallel processing

See the splitter only example at
http://camel.apache.org/composed-message-processor.html



On Fri, Mar 21, 2014 at 10:34 PM, Sona <dhanashree2...@yahoo.co.in> wrote:
> String processFiles=
> "file://somedirectory?readLock=rename&preMove=inprogress/&move=../processed/&moveFailed=../error/"
>
> String postProcessor = "file://somedirectory/inprogress";
>
> from(processFiles) .threads(10) .routeId("someId")
> .to("bean:somebean");
>
> from(postProcessor) .routeId("postProcress") .to("bean:postProcessorBean");
>
> Reading files from certain location using multiple threads. Then processing
> is done in "somebean".
>
> Now, i want to do some post processing once all the threads completes first
> route. i dont understand when exactly to call postprocessor. The way i have
> done above is giving incorrect results. PostProcessor is getting called
> before "Somebean" is completed by all the threads. I want to know how do i
> call postProcess once all the threads finish "somebean"
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Apache-camel-Multithreading-in-route-tp5749217.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Make your Camel applications look hawt, try: http://hawt.io

Reply via email to