You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Pham Ngoc Hai <pn...@yahoo.com> on 2012/04/22 16:05:22 UTC

Camel 2.2 Splitter parallelProcessing default threadpool

All the documentations that I found talk about this but for camel 2.3 onwards. I would like to know, What is the default thread pool size for my splitter if I use parallelProcessing in Camel 2.2?

Thanks,
Ngoc Hai

Re: Camel 2.2 Splitter parallelProcessing default threadpool

Posted by Pham Ngoc Hai <pn...@yahoo.com>.
Thank you Claus,
Indeed, I should had spent more time with the source code.



________________________________
 From: Claus Ibsen <cl...@gmail.com>
To: users@camel.apache.org 
Sent: Monday, April 23, 2012 5:44 PM
Subject: Re: Camel 2.2 Splitter parallelProcessing default threadpool
 
On Mon, Apr 23, 2012 at 11:35 AM, Pham Ngoc Hai <pn...@yahoo.com> wrote:
> Hi Claus,
> I'm not saying that others are not busy or anything. I thought that someone may already know the answer to my question so I was expecting a quick answer.
> I really appreciate that you are here to help users.
> Thank you.
>

Well if you took 1 minute to look more deeper in the 2.2 source code,
you will see that Splitter extends MulticastProcessor, and in that
class you find this piece of code

private static final int DEFAULT_THREADPOOL_SIZE = 10;


   if (isParallelProcessing()) {
            if (this.executorService == null) {
                // setup default executor as parallel processing
requires an executor
                this.executorService =
ExecutorServiceHelper.newScheduledThreadPool(DEFAULT_THREADPOOL_SIZE,
"Multicast", true);
            }
        }



>
>
>
>
>
> ________________________________
>  From: Claus Ibsen <cl...@gmail.com>
> To: users@camel.apache.org
> Sent: Monday, April 23, 2012 4:56 PM
> Subject: Re: Camel 2.2 Splitter parallelProcessing default threadpool
>
> On Mon, Apr 23, 2012 at 10:36 AM, Pham Ngoc Hai <pn...@yahoo.com> wrote:
>> Hi Claus,
>> I would love to set up debuging but my hands are tided to other matters now.
>> How about a quick answer?
>>
>
> And what do you think other peoples hands are?
>
> Camel 2.2 is not supported any longer at Apache.
>
> The threading model in Camel was refactored from Camel 2.3 onwards
> http://camel.apache.org/threading-model.html
>
> So the current code based vs 2.2 is different.
>
>
>
>
>> Thank you.
>>
>>
>>
>> ________________________________
>>  From: Claus Ibsen <cl...@gmail.com>
>> To: users@camel.apache.org; Pham Ngoc Hai <pn...@yahoo.com>
>> Sent: Monday, April 23, 2012 2:46 PM
>> Subject: Re: Camel 2.2 Splitter parallelProcessing default threadpool
>>
>> On Mon, Apr 23, 2012 at 8:43 AM, Pham Ngoc Hai <pn...@yahoo.com> wrote:
>>> Thanks Claus,
>>> That's what I've been doing,
>>> In /model/SplitDefinition.java there's parallelProcessing boolean with getter and setter
>>> In camel/processor/Splitter.java, pass parallelProcessing to the parent...and then I'm lost here...
>>>
>>
>> Then start up a debugger and step through the code.
>>
>>
>>
>>>
>>>
>>> ________________________________
>>>  From: Claus Ibsen <cl...@gmail.com>
>>> To: users@camel.apache.org; Pham Ngoc Hai <pn...@yahoo.com>
>>> Sent: Monday, April 23, 2012 2:30 PM
>>> Subject: Re: Camel 2.2 Splitter parallelProcessing default threadpool
>>>
>>> Hi
>>>
>>> I suggest to look in the source code.
>>>
>>>
>>> On Sun, Apr 22, 2012 at 4:05 PM, Pham Ngoc Hai <pn...@yahoo.com> wrote:
>>>> All the documentations that I found talk about this but for camel 2.3 onwards. I would like to know, What is the default thread pool size for my splitter if I use parallelProcessing in Camel 2.2?
>>>>
>>>> Thanks,
>>>> Ngoc Hai
>>>
>>>
>>>
>>> --
>>> Claus Ibsen
>>> -----------------
>>> CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
>>> FuseSource
>>> Email: cibsen@fusesource.com
>>> Web: http://fusesource.com
>>> Twitter: davsclaus, fusenews
>>> Blog: http://davsclaus.blogspot.com/
>>> Author of Camel in Action: http://www.manning.com/ibsen/
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
>> FuseSource
>> Email: cibsen@fusesource.com
>> Web: http://fusesource.com
>> Twitter: davsclaus, fusenews
>> Blog: http://davsclaus.blogspot.com/
>> Author of Camel in Action: http://www.manning.com/ibsen/
>
>
>
> --
> Claus Ibsen
> -----------------
> CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
> FuseSource
> Email: cibsen@fusesource.com
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/



-- 
Claus Ibsen
-----------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: Camel 2.2 Splitter parallelProcessing default threadpool

Posted by Claus Ibsen <cl...@gmail.com>.
On Mon, Apr 23, 2012 at 11:35 AM, Pham Ngoc Hai <pn...@yahoo.com> wrote:
> Hi Claus,
> I'm not saying that others are not busy or anything. I thought that someone may already know the answer to my question so I was expecting a quick answer.
> I really appreciate that you are here to help users.
> Thank you.
>

Well if you took 1 minute to look more deeper in the 2.2 source code,
you will see that Splitter extends MulticastProcessor, and in that
class you find this piece of code

 private static final int DEFAULT_THREADPOOL_SIZE = 10;


   if (isParallelProcessing()) {
            if (this.executorService == null) {
                // setup default executor as parallel processing
requires an executor
                this.executorService =
ExecutorServiceHelper.newScheduledThreadPool(DEFAULT_THREADPOOL_SIZE,
"Multicast", true);
            }
        }



>
>
>
>
>
> ________________________________
>  From: Claus Ibsen <cl...@gmail.com>
> To: users@camel.apache.org
> Sent: Monday, April 23, 2012 4:56 PM
> Subject: Re: Camel 2.2 Splitter parallelProcessing default threadpool
>
> On Mon, Apr 23, 2012 at 10:36 AM, Pham Ngoc Hai <pn...@yahoo.com> wrote:
>> Hi Claus,
>> I would love to set up debuging but my hands are tided to other matters now.
>> How about a quick answer?
>>
>
> And what do you think other peoples hands are?
>
> Camel 2.2 is not supported any longer at Apache.
>
> The threading model in Camel was refactored from Camel 2.3 onwards
> http://camel.apache.org/threading-model.html
>
> So the current code based vs 2.2 is different.
>
>
>
>
>> Thank you.
>>
>>
>>
>> ________________________________
>>  From: Claus Ibsen <cl...@gmail.com>
>> To: users@camel.apache.org; Pham Ngoc Hai <pn...@yahoo.com>
>> Sent: Monday, April 23, 2012 2:46 PM
>> Subject: Re: Camel 2.2 Splitter parallelProcessing default threadpool
>>
>> On Mon, Apr 23, 2012 at 8:43 AM, Pham Ngoc Hai <pn...@yahoo.com> wrote:
>>> Thanks Claus,
>>> That's what I've been doing,
>>> In /model/SplitDefinition.java there's parallelProcessing boolean with getter and setter
>>> In camel/processor/Splitter.java, pass parallelProcessing to the parent...and then I'm lost here...
>>>
>>
>> Then start up a debugger and step through the code.
>>
>>
>>
>>>
>>>
>>> ________________________________
>>>  From: Claus Ibsen <cl...@gmail.com>
>>> To: users@camel.apache.org; Pham Ngoc Hai <pn...@yahoo.com>
>>> Sent: Monday, April 23, 2012 2:30 PM
>>> Subject: Re: Camel 2.2 Splitter parallelProcessing default threadpool
>>>
>>> Hi
>>>
>>> I suggest to look in the source code.
>>>
>>>
>>> On Sun, Apr 22, 2012 at 4:05 PM, Pham Ngoc Hai <pn...@yahoo.com> wrote:
>>>> All the documentations that I found talk about this but for camel 2.3 onwards. I would like to know, What is the default thread pool size for my splitter if I use parallelProcessing in Camel 2.2?
>>>>
>>>> Thanks,
>>>> Ngoc Hai
>>>
>>>
>>>
>>> --
>>> Claus Ibsen
>>> -----------------
>>> CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
>>> FuseSource
>>> Email: cibsen@fusesource.com
>>> Web: http://fusesource.com
>>> Twitter: davsclaus, fusenews
>>> Blog: http://davsclaus.blogspot.com/
>>> Author of Camel in Action: http://www.manning.com/ibsen/
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
>> FuseSource
>> Email: cibsen@fusesource.com
>> Web: http://fusesource.com
>> Twitter: davsclaus, fusenews
>> Blog: http://davsclaus.blogspot.com/
>> Author of Camel in Action: http://www.manning.com/ibsen/
>
>
>
> --
> Claus Ibsen
> -----------------
> CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
> FuseSource
> Email: cibsen@fusesource.com
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/



-- 
Claus Ibsen
-----------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: Camel 2.2 Splitter parallelProcessing default threadpool

Posted by Pham Ngoc Hai <pn...@yahoo.com>.
Hi Claus,
I'm not saying that others are not busy or anything. I thought that someone may already know the answer to my question so I was expecting a quick answer.
I really appreciate that you are here to help users.
Thank you.






________________________________
 From: Claus Ibsen <cl...@gmail.com>
To: users@camel.apache.org 
Sent: Monday, April 23, 2012 4:56 PM
Subject: Re: Camel 2.2 Splitter parallelProcessing default threadpool
 
On Mon, Apr 23, 2012 at 10:36 AM, Pham Ngoc Hai <pn...@yahoo.com> wrote:
> Hi Claus,
> I would love to set up debuging but my hands are tided to other matters now.
> How about a quick answer?
>

And what do you think other peoples hands are?

Camel 2.2 is not supported any longer at Apache.

The threading model in Camel was refactored from Camel 2.3 onwards
http://camel.apache.org/threading-model.html

So the current code based vs 2.2 is different.




> Thank you.
>
>
>
> ________________________________
>  From: Claus Ibsen <cl...@gmail.com>
> To: users@camel.apache.org; Pham Ngoc Hai <pn...@yahoo.com>
> Sent: Monday, April 23, 2012 2:46 PM
> Subject: Re: Camel 2.2 Splitter parallelProcessing default threadpool
>
> On Mon, Apr 23, 2012 at 8:43 AM, Pham Ngoc Hai <pn...@yahoo.com> wrote:
>> Thanks Claus,
>> That's what I've been doing,
>> In /model/SplitDefinition.java there's parallelProcessing boolean with getter and setter
>> In camel/processor/Splitter.java, pass parallelProcessing to the parent...and then I'm lost here...
>>
>
> Then start up a debugger and step through the code.
>
>
>
>>
>>
>> ________________________________
>>  From: Claus Ibsen <cl...@gmail.com>
>> To: users@camel.apache.org; Pham Ngoc Hai <pn...@yahoo.com>
>> Sent: Monday, April 23, 2012 2:30 PM
>> Subject: Re: Camel 2.2 Splitter parallelProcessing default threadpool
>>
>> Hi
>>
>> I suggest to look in the source code.
>>
>>
>> On Sun, Apr 22, 2012 at 4:05 PM, Pham Ngoc Hai <pn...@yahoo.com> wrote:
>>> All the documentations that I found talk about this but for camel 2.3 onwards. I would like to know, What is the default thread pool size for my splitter if I use parallelProcessing in Camel 2.2?
>>>
>>> Thanks,
>>> Ngoc Hai
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
>> FuseSource
>> Email: cibsen@fusesource.com
>> Web: http://fusesource.com
>> Twitter: davsclaus, fusenews
>> Blog: http://davsclaus.blogspot.com/
>> Author of Camel in Action: http://www.manning.com/ibsen/
>
>
>
> --
> Claus Ibsen
> -----------------
> CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
> FuseSource
> Email: cibsen@fusesource.com
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/



-- 
Claus Ibsen
-----------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: Camel 2.2 Splitter parallelProcessing default threadpool

Posted by Claus Ibsen <cl...@gmail.com>.
On Mon, Apr 23, 2012 at 10:36 AM, Pham Ngoc Hai <pn...@yahoo.com> wrote:
> Hi Claus,
> I would love to set up debuging but my hands are tided to other matters now.
> How about a quick answer?
>

And what do you think other peoples hands are?

Camel 2.2 is not supported any longer at Apache.

The threading model in Camel was refactored from Camel 2.3 onwards
http://camel.apache.org/threading-model.html

So the current code based vs 2.2 is different.




> Thank you.
>
>
>
> ________________________________
>  From: Claus Ibsen <cl...@gmail.com>
> To: users@camel.apache.org; Pham Ngoc Hai <pn...@yahoo.com>
> Sent: Monday, April 23, 2012 2:46 PM
> Subject: Re: Camel 2.2 Splitter parallelProcessing default threadpool
>
> On Mon, Apr 23, 2012 at 8:43 AM, Pham Ngoc Hai <pn...@yahoo.com> wrote:
>> Thanks Claus,
>> That's what I've been doing,
>> In /model/SplitDefinition.java there's parallelProcessing boolean with getter and setter
>> In camel/processor/Splitter.java, pass parallelProcessing to the parent...and then I'm lost here...
>>
>
> Then start up a debugger and step through the code.
>
>
>
>>
>>
>> ________________________________
>>  From: Claus Ibsen <cl...@gmail.com>
>> To: users@camel.apache.org; Pham Ngoc Hai <pn...@yahoo.com>
>> Sent: Monday, April 23, 2012 2:30 PM
>> Subject: Re: Camel 2.2 Splitter parallelProcessing default threadpool
>>
>> Hi
>>
>> I suggest to look in the source code.
>>
>>
>> On Sun, Apr 22, 2012 at 4:05 PM, Pham Ngoc Hai <pn...@yahoo.com> wrote:
>>> All the documentations that I found talk about this but for camel 2.3 onwards. I would like to know, What is the default thread pool size for my splitter if I use parallelProcessing in Camel 2.2?
>>>
>>> Thanks,
>>> Ngoc Hai
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
>> FuseSource
>> Email: cibsen@fusesource.com
>> Web: http://fusesource.com
>> Twitter: davsclaus, fusenews
>> Blog: http://davsclaus.blogspot.com/
>> Author of Camel in Action: http://www.manning.com/ibsen/
>
>
>
> --
> Claus Ibsen
> -----------------
> CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
> FuseSource
> Email: cibsen@fusesource.com
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/



-- 
Claus Ibsen
-----------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: Camel 2.2 Splitter parallelProcessing default threadpool

Posted by Pham Ngoc Hai <pn...@yahoo.com>.
Hi Claus,
I would love to set up debuging but my hands are tided to other matters now.
How about a quick answer?

Thank you.



________________________________
 From: Claus Ibsen <cl...@gmail.com>
To: users@camel.apache.org; Pham Ngoc Hai <pn...@yahoo.com> 
Sent: Monday, April 23, 2012 2:46 PM
Subject: Re: Camel 2.2 Splitter parallelProcessing default threadpool
 
On Mon, Apr 23, 2012 at 8:43 AM, Pham Ngoc Hai <pn...@yahoo.com> wrote:
> Thanks Claus,
> That's what I've been doing,
> In /model/SplitDefinition.java there's parallelProcessing boolean with getter and setter
> In camel/processor/Splitter.java, pass parallelProcessing to the parent...and then I'm lost here...
>

Then start up a debugger and step through the code.



>
>
> ________________________________
>  From: Claus Ibsen <cl...@gmail.com>
> To: users@camel.apache.org; Pham Ngoc Hai <pn...@yahoo.com>
> Sent: Monday, April 23, 2012 2:30 PM
> Subject: Re: Camel 2.2 Splitter parallelProcessing default threadpool
>
> Hi
>
> I suggest to look in the source code.
>
>
> On Sun, Apr 22, 2012 at 4:05 PM, Pham Ngoc Hai <pn...@yahoo.com> wrote:
>> All the documentations that I found talk about this but for camel 2.3 onwards. I would like to know, What is the default thread pool size for my splitter if I use parallelProcessing in Camel 2.2?
>>
>> Thanks,
>> Ngoc Hai
>
>
>
> --
> Claus Ibsen
> -----------------
> CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
> FuseSource
> Email: cibsen@fusesource.com
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/



-- 
Claus Ibsen
-----------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: Camel 2.2 Splitter parallelProcessing default threadpool

Posted by Claus Ibsen <cl...@gmail.com>.
On Mon, Apr 23, 2012 at 8:43 AM, Pham Ngoc Hai <pn...@yahoo.com> wrote:
> Thanks Claus,
> That's what I've been doing,
> In /model/SplitDefinition.java there's parallelProcessing boolean with getter and setter
> In camel/processor/Splitter.java, pass parallelProcessing to the parent...and then I'm lost here...
>

Then start up a debugger and step through the code.



>
>
> ________________________________
>  From: Claus Ibsen <cl...@gmail.com>
> To: users@camel.apache.org; Pham Ngoc Hai <pn...@yahoo.com>
> Sent: Monday, April 23, 2012 2:30 PM
> Subject: Re: Camel 2.2 Splitter parallelProcessing default threadpool
>
> Hi
>
> I suggest to look in the source code.
>
>
> On Sun, Apr 22, 2012 at 4:05 PM, Pham Ngoc Hai <pn...@yahoo.com> wrote:
>> All the documentations that I found talk about this but for camel 2.3 onwards. I would like to know, What is the default thread pool size for my splitter if I use parallelProcessing in Camel 2.2?
>>
>> Thanks,
>> Ngoc Hai
>
>
>
> --
> Claus Ibsen
> -----------------
> CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
> FuseSource
> Email: cibsen@fusesource.com
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/



-- 
Claus Ibsen
-----------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: Camel 2.2 Splitter parallelProcessing default threadpool

Posted by Pham Ngoc Hai <pn...@yahoo.com>.
Thanks Claus,
That's what I've been doing,
In /model/SplitDefinition.java there's parallelProcessing boolean with getter and setter
In camel/processor/Splitter.java, pass parallelProcessing to the parent...and then I'm lost here...



________________________________
 From: Claus Ibsen <cl...@gmail.com>
To: users@camel.apache.org; Pham Ngoc Hai <pn...@yahoo.com> 
Sent: Monday, April 23, 2012 2:30 PM
Subject: Re: Camel 2.2 Splitter parallelProcessing default threadpool
 
Hi

I suggest to look in the source code.


On Sun, Apr 22, 2012 at 4:05 PM, Pham Ngoc Hai <pn...@yahoo.com> wrote:
> All the documentations that I found talk about this but for camel 2.3 onwards. I would like to know, What is the default thread pool size for my splitter if I use parallelProcessing in Camel 2.2?
>
> Thanks,
> Ngoc Hai



-- 
Claus Ibsen
-----------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: Camel 2.2 Splitter parallelProcessing default threadpool

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

I suggest to look in the source code.


On Sun, Apr 22, 2012 at 4:05 PM, Pham Ngoc Hai <pn...@yahoo.com> wrote:
> All the documentations that I found talk about this but for camel 2.3 onwards. I would like to know, What is the default thread pool size for my splitter if I use parallelProcessing in Camel 2.2?
>
> Thanks,
> Ngoc Hai



-- 
Claus Ibsen
-----------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/