You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by David Hoffer <dh...@gmail.com> on 2015/11/20 01:22:40 UTC

How to configure threadPoolProfile?

I'm trying to change the default thread pool using the following but then
my app won't start it says the XML is invalid at the routeContextRef line
but that line works fine before I added threadPoolProfile.  What am I doing
wrong?  I'm using Camel 2.8.2.

<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">

    <threadPoolProfile id="gpDefaultThreadPool"
                       defaultProfile="true"
                       poolSize="10"
                       maxPoolSize="1000"
                       maxQueueSize="-1"
                       rejectedPolicy="CallerRuns"/>

  <jmxAgent id="agent" createConnector="true" serviceUrlPath="/gp" />

   <routeContextRef ref="ingestRoutes"/>

...

</camelContext>
</beans>

Re: How to configure threadPoolProfile?

Posted by David Hoffer <dh...@gmail.com>.
Yup, my bad...has to be after all my routeContextRef's.

-Dave

On Thu, Nov 19, 2015 at 11:35 PM, Claus Ibsen <cl...@gmail.com> wrote:

> The order matters so you may need to change the order. The XSD schema
> tells you the order and your editor should very likely be able to
> validate the XML for you.
>
> On Fri, Nov 20, 2015 at 1:22 AM, David Hoffer <dh...@gmail.com> wrote:
> > I'm trying to change the default thread pool using the following but then
> > my app won't start it says the XML is invalid at the routeContextRef line
> > but that line works fine before I added threadPoolProfile.  What am I
> doing
> > wrong?  I'm using Camel 2.8.2.
> >
> > <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
> >
> >     <threadPoolProfile id="gpDefaultThreadPool"
> >                        defaultProfile="true"
> >                        poolSize="10"
> >                        maxPoolSize="1000"
> >                        maxQueueSize="-1"
> >                        rejectedPolicy="CallerRuns"/>
> >
> >   <jmxAgent id="agent" createConnector="true" serviceUrlPath="/gp" />
> >
> >    <routeContextRef ref="ingestRoutes"/>
> >
> > ...
> >
> > </camelContext>
> > </beans>
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>

Re: How to configure threadPoolProfile?

Posted by Claus Ibsen <cl...@gmail.com>.
The order matters so you may need to change the order. The XSD schema
tells you the order and your editor should very likely be able to
validate the XML for you.

On Fri, Nov 20, 2015 at 1:22 AM, David Hoffer <dh...@gmail.com> wrote:
> I'm trying to change the default thread pool using the following but then
> my app won't start it says the XML is invalid at the routeContextRef line
> but that line works fine before I added threadPoolProfile.  What am I doing
> wrong?  I'm using Camel 2.8.2.
>
> <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
>
>     <threadPoolProfile id="gpDefaultThreadPool"
>                        defaultProfile="true"
>                        poolSize="10"
>                        maxPoolSize="1000"
>                        maxQueueSize="-1"
>                        rejectedPolicy="CallerRuns"/>
>
>   <jmxAgent id="agent" createConnector="true" serviceUrlPath="/gp" />
>
>    <routeContextRef ref="ingestRoutes"/>
>
> ...
>
> </camelContext>
> </beans>



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