You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by christian ohr <ch...@icw.de> on 2010/03/30 19:04:06 UTC
Setting ProducerServicePool in Spring Camel Context
Hi,
is there any way to configure the ProducerServicePool in a Spring Camel
Context? The problem is that I want to reduce the number of cached
producers.
I tried something like this:
...
<camel:camelContext id="camelContext" trace="false">
<camel:properties>
<camel:property key="serviceProducerPool" value="#producerPool"/>
</camel:properties>
<camel:jmxAgent id="agent"
disabled="false"
createConnector="true"
registryPort="1099"
connectorPort="1100"/>
<camel:routeBuilder ref="myRouteBuilder" />
<camel:routeBuilder ref="myOtherRouteBuilder" />
</camel:camelContext>
<bean id="producerPool"
class="org.apache.camel.impl.DefaultProducerServicePool">
<constructor-arg value="3"/>
</bean>
...
but apparently it seemed to have no effect.
Any hints or workaournds?
thanks
Christian
--
View this message in context: http://old.nabble.com/Setting-ProducerServicePool-in-Spring-Camel-Context-tp28085498p28085498.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Setting ProducerServicePool in Spring Camel Context
Posted by christian ohr <ch...@icw.de>.
I put a comment into CAMEL-2558.
Christian
Claus Ibsen-2 wrote:
>
> Hi
>
> Its just a setter on CamelContext but it may be harder to do with
> Spring XML lingo when using <camelContext/>
> There is a related JIRA ticket to have easier configuration of the
> pool size of <producerTemplate> and <consumerTemplate>.
> So please add a comment on that ticket about your use case.
>
>
>
> On Tue, Mar 30, 2010 at 7:04 PM, christian ohr <ch...@icw.de>
> wrote:
>>
>> Hi,
>>
>> is there any way to configure the ProducerServicePool in a Spring Camel
>> Context? The problem is that I want to reduce the number of cached
>> producers.
>>
>> I tried something like this:
>>
>> ...
>> <camel:camelContext id="camelContext" trace="false">
>> <camel:properties>
>> <camel:property key="serviceProducerPool"
>> value="#producerPool"/>
>> </camel:properties>
>> <camel:jmxAgent id="agent"
>> disabled="false"
>> createConnector="true"
>> registryPort="1099"
>> connectorPort="1100"/>
>>
>> <camel:routeBuilder ref="myRouteBuilder" />
>> <camel:routeBuilder ref="myOtherRouteBuilder" />
>>
>> </camel:camelContext>
>>
>> <bean id="producerPool"
>> class="org.apache.camel.impl.DefaultProducerServicePool">
>> <constructor-arg value="3"/>
>> </bean>
>> ...
>>
>> but apparently it seemed to have no effect.
>> Any hints or workaournds?
>>
>> thanks
>> Christian
>>
>> --
>> View this message in context:
>> http://old.nabble.com/Setting-ProducerServicePool-in-Spring-Camel-Context-tp28085498p28085498.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>
>
--
View this message in context: http://old.nabble.com/Setting-ProducerServicePool-in-Spring-Camel-Context-tp28085498p28094118.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Setting ProducerServicePool in Spring Camel Context
Posted by Willem Jiang <wi...@gmail.com>.
Just one comments for the <camel:properties>, it's used for setup the
properties which can be use for CamelContext, but current camelContext
doesn't pick up the ProducerServicePool from the <camel:properties>.
Willem
Claus Ibsen wrote:
> Hi
>
> Its just a setter on CamelContext but it may be harder to do with
> Spring XML lingo when using <camelContext/>
> There is a related JIRA ticket to have easier configuration of the
> pool size of <producerTemplate> and <consumerTemplate>.
> So please add a comment on that ticket about your use case.
>
>
>
> On Tue, Mar 30, 2010 at 7:04 PM, christian ohr <ch...@icw.de> wrote:
>> Hi,
>>
>> is there any way to configure the ProducerServicePool in a Spring Camel
>> Context? The problem is that I want to reduce the number of cached
>> producers.
>>
>> I tried something like this:
>>
>> ...
>> <camel:camelContext id="camelContext" trace="false">
>> <camel:properties>
>> <camel:property key="serviceProducerPool" value="#producerPool"/>
>> </camel:properties>
>> <camel:jmxAgent id="agent"
>> disabled="false"
>> createConnector="true"
>> registryPort="1099"
>> connectorPort="1100"/>
>>
>> <camel:routeBuilder ref="myRouteBuilder" />
>> <camel:routeBuilder ref="myOtherRouteBuilder" />
>>
>> </camel:camelContext>
>>
>> <bean id="producerPool"
>> class="org.apache.camel.impl.DefaultProducerServicePool">
>> <constructor-arg value="3"/>
>> </bean>
>> ...
>>
>> but apparently it seemed to have no effect.
>> Any hints or workaournds?
>>
>> thanks
>> Christian
>>
>> --
>> View this message in context: http://old.nabble.com/Setting-ProducerServicePool-in-Spring-Camel-Context-tp28085498p28085498.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>
>
>
Re: Setting ProducerServicePool in Spring Camel Context
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
Its just a setter on CamelContext but it may be harder to do with
Spring XML lingo when using <camelContext/>
There is a related JIRA ticket to have easier configuration of the
pool size of <producerTemplate> and <consumerTemplate>.
So please add a comment on that ticket about your use case.
On Tue, Mar 30, 2010 at 7:04 PM, christian ohr <ch...@icw.de> wrote:
>
> Hi,
>
> is there any way to configure the ProducerServicePool in a Spring Camel
> Context? The problem is that I want to reduce the number of cached
> producers.
>
> I tried something like this:
>
> ...
> <camel:camelContext id="camelContext" trace="false">
> <camel:properties>
> <camel:property key="serviceProducerPool" value="#producerPool"/>
> </camel:properties>
> <camel:jmxAgent id="agent"
> disabled="false"
> createConnector="true"
> registryPort="1099"
> connectorPort="1100"/>
>
> <camel:routeBuilder ref="myRouteBuilder" />
> <camel:routeBuilder ref="myOtherRouteBuilder" />
>
> </camel:camelContext>
>
> <bean id="producerPool"
> class="org.apache.camel.impl.DefaultProducerServicePool">
> <constructor-arg value="3"/>
> </bean>
> ...
>
> but apparently it seemed to have no effect.
> Any hints or workaournds?
>
> thanks
> Christian
>
> --
> View this message in context: http://old.nabble.com/Setting-ProducerServicePool-in-Spring-Camel-Context-tp28085498p28085498.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
--
Claus Ibsen
Apache Camel Committer
Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus