You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "Hubertus.Willuhn" <hu...@dinsoftware.de> on 2016/09/01 06:50:15 UTC

Split EIP not using defined thread pool size

Hi,

i have a route definition like:

from("file:/dir")
   .split()
      .tokenizeXML("element", "root").streaming()
      .parallelProcessing().threads(10, 15)
      .process(...)
      .to("mock:out")
   .end()

I assume that this would result in a XML splitting with up to 15 threads and
minimum 10 threads.
But logging in the process step tells me thread numbers up to 45?

The same thing happens if i am using a ThreadPoolProfile configured over a
Java Configuration class.

What is the problem with my route definition?

I am using Camel 2.17.1 and Spring 4.2.5. The route is in a single
RouteBuilder class loaded as @Component. 

Best regards,

Zipunrar



--
View this message in context: http://camel.465427.n5.nabble.com/Split-EIP-not-using-defined-thread-pool-size-tp5787075.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Split EIP not using defined thread pool size

Posted by "Hubertus.Willuhn" <hu...@dinsoftware.de>.
Hi,

thanks for this information...this means i can "stack" thread pools

I think that fact should be in the documentation as an example how NOT to do
it?! ;)

Best regards




--
View this message in context: http://camel.465427.n5.nabble.com/Split-EIP-not-using-defined-thread-pool-size-tp5787075p5787091.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Split EIP not using defined thread pool size

Posted by Claus Ibsen <cl...@gmail.com>.
You are using 2 x thread pools, the parallel processing from splitter,
and then a 2nd threads.

Configure this only on the splitter with the executorServiceRef
http://camel.apache.org/splitter

And read the thread pool docs
http://camel.apache.org/threading-model.html

And if you have Camel in Action book then this use-case is covered in
more details in the book.

On Thu, Sep 1, 2016 at 8:50 AM, Hubertus.Willuhn
<hu...@dinsoftware.de> wrote:
> Hi,
>
> i have a route definition like:
>
> from("file:/dir")
>    .split()
>       .tokenizeXML("element", "root").streaming()
>       .parallelProcessing().threads(10, 15)
>       .process(...)
>       .to("mock:out")
>    .end()
>
> I assume that this would result in a XML splitting with up to 15 threads and
> minimum 10 threads.
> But logging in the process step tells me thread numbers up to 45?
>
> The same thing happens if i am using a ThreadPoolProfile configured over a
> Java Configuration class.
>
> What is the problem with my route definition?
>
> I am using Camel 2.17.1 and Spring 4.2.5. The route is in a single
> RouteBuilder class loaded as @Component.
>
> Best regards,
>
> Zipunrar
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Split-EIP-not-using-defined-thread-pool-size-tp5787075.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2