Quantcast

ThreadPoolProfile and multicast

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

ThreadPoolProfile and multicast

Preben.Asmussen
Hi

I'm wondering why my threadpoolprofile doesn't seem to affect multicast in a route. I have set up a maxPoolsize and poolsize of 5, but when i look in JConsole is see 11 threads in the pool. Seems to me that the multicast is not using the custom thread profile but runs with the defaultThreadPoolProfile.

Running Camel 2.9.0

I have attached VisualVm screenshot.

Route :
<camelContext id="dalet-bcr-in-Context" xmlns="http://camel.apache.org/schema/spring">
                <threadPoolProfile id="multicastThreadPoolProfile" poolSize="5" maxPoolSize="5"/>
               
                <route id="dalet-timer-route">
                        <from uri="timer:trackplayed?fixedRate=true&amp;period=30000&amp;delay=30000" />
                        <onException>
                                <exception>org.apache.camel.CamelExchangeException</exception>
                                <handled><constant>true</constant></handled>
                                <log message="CamelExchangeException occured : One route seems not to be started" loggingLevel="WARN"/>
                        </onException>
                        <multicast shareUnitOfWork="false" parallelProcessing="true" stopOnException="false" executorServiceRef="multicastThreadPoolProfile">
                                <to uri="direct:dalet13a"/>
                                <to uri="direct:dalet13b"/>
                                <to uri="direct:dalet13c"/>
                                <to uri="direct:dalet15a"/>
                                <to uri="direct:dalet15b"/>
                                <to uri="direct:dalet15c"/>
                                <to uri="direct:dalet3a"/>
                                <to uri="direct:dalet3b"/>
                                <to uri="direct:dalet5a"/>
                                <to uri="direct:dalet7a"/>
                                <to uri="direct:dalet7b"/>
                                <to uri="direct:dalet7c"/>
                                <to uri="direct:daletAFV"/>
                        </multicast>
                        <log loggingLevel="TRACE" message="Processing of all destinations finished"/>
                </route>
Subroutes here .....

cheers
Preben

multicastpool.JPG
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: ThreadPoolProfile and multicast

Claus Ibsen-2
Hi

You should only just configured executorServiceRef, if using a custom
thread pool / thread pool profile.
The parallelProcessing should not be configured as well.

We should possible improved this by validating this and reject as mis
configuration. Fell free to create a JIRA ticket.

On Wed, Feb 29, 2012 at 8:21 AM, Preben.Asmussen <[hidden email]> wrote:

> Hi
>
> I'm wondering why my threadpoolprofile doesn't seem to affect multicast in a
> route. I have set up a maxPoolsize and poolsize of 5, but when i look in
> JConsole is see 11 threads in the pool. Seems to me that the multicast is
> not using the custom thread profile but runs with the
> defaultThreadPoolProfile.
>
> Running Camel 2.9.0
>
> I have attached VisualVm screenshot.
>
> Route :
> <camelContext id="dalet-bcr-in-Context"
> xmlns="http://camel.apache.org/schema/spring">
>                <threadPoolProfile id="multicastThreadPoolProfile" poolSize="5"
> maxPoolSize="5"/>
>
>                <route id="dalet-timer-route">
>                        <from
> uri="timer:trackplayed?fixedRate=true&amp;period=30000&amp;delay=30000" />
>                        <onException>
>                                <exception>org.apache.camel.CamelExchangeException</exception>
>                                <handled><constant>true</constant></handled>
>                                <log message="CamelExchangeException occured : One route seems not to be
> started" loggingLevel="WARN"/>
>                        </onException>
>                        <multicast shareUnitOfWork="false" parallelProcessing="true"
> stopOnException="false" executorServiceRef="multicastThreadPoolProfile">
>                                <to uri="direct:dalet13a"/>
>                                <to uri="direct:dalet13b"/>
>                                <to uri="direct:dalet13c"/>
>                                <to uri="direct:dalet15a"/>
>                                <to uri="direct:dalet15b"/>
>                                <to uri="direct:dalet15c"/>
>                                <to uri="direct:dalet3a"/>
>                                <to uri="direct:dalet3b"/>
>                                <to uri="direct:dalet5a"/>
>                                <to uri="direct:dalet7a"/>
>                                <to uri="direct:dalet7b"/>
>                                <to uri="direct:dalet7c"/>
>                                <to uri="direct:daletAFV"/>
>                        </multicast>
>                        <log loggingLevel="TRACE" message="Processing of all destinations
> finished"/>
>                </route>
> Subroutes here .....
>
> cheers
> Preben
>
> http://camel.465427.n5.nabble.com/file/n5524245/multicastpool.JPG
> multicastpool.JPG
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/ThreadPoolProfile-and-multicast-tp5524245p5524245.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



--
Claus Ibsen
-----------------
FuseSource
Email: [hidden email]
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: ThreadPoolProfile and multicast

Preben.Asmussen
Hi

Thanks, but if I remove parelleProcessing the threadpool is not comming up at all. At least it is not visible as running threads in VisualVM, and it seems that the multicast in running on the main thread.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: ThreadPoolProfile and multicast

Preben.Asmussen
Ahh - Got it working. I actually have to set defaultProfile equals ="true". I don't know this seems odd as I wanted to have a custom profile.

<camelContext id="dalet-bcr-in-Context" xmlns="http://camel.apache.org/schema/spring">
                <threadPoolProfile defaultProfile="true" id="multicastThreadPoolProfile" poolSize="5" maxPoolSize="5"/>
               
                <route id="dalet-timer-route">
                        <from uri="timer:trackplayed?fixedRate=true&amp;period=30000&amp;delay=30000" />
                        <onException>
                                <exception>org.apache.camel.CamelExchangeException</exception>
                                <handled><constant>true</constant></handled>
                                <log message="CamelExchangeException occured : One route seems not to be started" loggingLevel="WARN"/>
                        </onException>
                        <multicast shareUnitOfWork="false" parallelProcessing="true" stopOnException="false" executorServiceRef="multicastThreadPoolProfile">
                                <to uri="direct:dalet13a"/>
                                <to uri="direct:dalet13b"/>
                                <to uri="direct:dalet13c"/>
                                <to uri="direct:dalet15a"/>
                                <to uri="direct:dalet15b"/>
                                <to uri="direct:dalet15c"/>
                                <to uri="direct:dalet3a"/>
                                <to uri="direct:dalet3b"/>
                                <to uri="direct:dalet5a"/>
                                <to uri="direct:dalet7a"/>
                                <to uri="direct:dalet7b"/>
                                <to uri="direct:dalet7c"/>
                                <to uri="direct:daletAFV"/>
                        </multicast>
                        <log loggingLevel="TRACE" message="Processing of all destinations finished"/>
                </route>

... subroutes.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: ThreadPoolProfile and multicast

Claus Ibsen-2
Hi

Its actually a bug when using a custom thread pool profile. I have logged a JIRA
https://issues.apache.org/jira/browse/CAMEL-5053

And I was wrong about the parallel, you have to enabled that as well,
when using executorServiceRef.
But not if using executorService directly. This seems a bit wrong to
me. So I will log a 2nd JIRA for that as well.


On Wed, Feb 29, 2012 at 9:45 AM, Preben.Asmussen <[hidden email]> wrote:

> Ahh - Got it working. I actually have to set defaultProfile equals ="true". I
> don't know this seems odd as I wanted to have a custom profile.
>
> <camelContext id="dalet-bcr-in-Context"
> xmlns="http://camel.apache.org/schema/spring">
>                <threadPoolProfile defaultProfile="true" id="multicastThreadPoolProfile"
> poolSize="5" maxPoolSize="5"/>
>
>                <route id="dalet-timer-route">
>                        <from
> uri="timer:trackplayed?fixedRate=true&amp;period=30000&amp;delay=30000" />
>                        <onException>
>                                <exception>org.apache.camel.CamelExchangeException</exception>
>                                <handled><constant>true</constant></handled>
>                                <log message="CamelExchangeException occured : One route seems not to be
> started" loggingLevel="WARN"/>
>                        </onException>
>                        <multicast shareUnitOfWork="false" parallelProcessing="true"
> stopOnException="false" executorServiceRef="multicastThreadPoolProfile">
>                                <to uri="direct:dalet13a"/>
>                                <to uri="direct:dalet13b"/>
>                                <to uri="direct:dalet13c"/>
>                                <to uri="direct:dalet15a"/>
>                                <to uri="direct:dalet15b"/>
>                                <to uri="direct:dalet15c"/>
>                                <to uri="direct:dalet3a"/>
>                                <to uri="direct:dalet3b"/>
>                                <to uri="direct:dalet5a"/>
>                                <to uri="direct:dalet7a"/>
>                                <to uri="direct:dalet7b"/>
>                                <to uri="direct:dalet7c"/>
>                                <to uri="direct:daletAFV"/>
>                        </multicast>
>                        <log loggingLevel="TRACE" message="Processing of all destinations
> finished"/>
>                </route>
>
> ... subroutes.
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/ThreadPoolProfile-and-multicast-tp5524245p5524379.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



--
Claus Ibsen
-----------------
FuseSource
Email: [hidden email]
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: ThreadPoolProfile and multicast

Preben.Asmussen
Thanks Claus

Nice support
Loading...