You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by kalber <Ka...@swslt.com> on 2013/12/31 10:54:11 UTC

Parallel processing

Hi,

i try to process in parallel 2  http request using SEDA component, but 
only one message  at time is processed.

Here my configuration, where i set concurrentConsumers=2 :

from("direct:parallelDirect")
.split(body(ArrayList.class))
.to("seda:parallelSeda?concurrentConsumers=2")
.to("direct:requestDirect");

What i must do, that 2 requests are processed in parallel ?



-----
kh
--
View this message in context: http://camel.465427.n5.nabble.com/Parallel-processing-tp5745377.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Parallel processing

Posted by Bilgin Ibryam <bi...@gmail.com>.
Seda supports parallel processing but on the consumer side.
So if you have:

from("seda:parallelSeda?concurrentConsumers=2")
.to(...)

this route will process two messages in parallel.

Looking at your route, you don't need seda endpoint to make it parallel,
you can simply replace seda with

 .threads(2)

to have the rest of the route working in parallel.


Cheers,


On 31 December 2013 09:54, kalber <Ka...@swslt.com> wrote:

> Hi,
>
> i try to process in parallel 2  http request using SEDA component, but
> only one message  at time is processed.
>
> Here my configuration, where i set concurrentConsumers=2 :
>
> from("direct:parallelDirect")
> .split(body(ArrayList.class))
> .to("seda:parallelSeda?concurrentConsumers=2")
> .to("direct:requestDirect");
>
> What i must do, that 2 requests are processed in parallel ?
>
>
>
> -----
> kh
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Parallel-processing-tp5745377.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Bilgin Ibryam

Apache Camel & Apache OFBiz committer
Blog: ofbizian.com
Twitter: @bibryam <https://twitter.com/bibryam>

Author of Instant Apache Camel Message Routing
http://www.amazon.com/dp/1783283475