You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Ioannis Canellos <io...@gmail.com> on 2011/02/22 19:55:18 UTC

Producer Template and number of ActiveMQ Producers.

I am building an application that uses camel and activemq.
Some of my routes are defined using spring and I also make uses of the
@Produce annotations.

I notice that on the when I add messages on an activemq queue using the "to"
element a single producer is created on activemq.
When I add messages using the @Produce annotation I notice multiple activemq
producers.

Are these two linked in any way? Can configure its behaviour somehow?

Thanks in advance,
*Ioannis Canellos*

Re: Producer Template and number of ActiveMQ Producers.

Posted by Ioannis Canellos <io...@gmail.com>.
Thanks for your response.
I declared the template in the camel context, and injected it using spring's
@Autowried / @Qualifier and I think it works (currently testing it).

I guess that a similar thing happens to consumers to *(I use @Consume
annotation on a method)*. Any ideas on how I could configure the cache size
in this case?

Thanks again

On Wed, Feb 23, 2011 at 8:43 AM, Taariq Levack <ta...@itaro.co.za> wrote:

> Hi
>
> This is in the FAQ[1]
>
> In the first case the route is setup once and the template is created once.
> How is @Produce used? If it's in a singleton it will also only be injected
> once,
> but I assume it's in a bean invocation.
>
> [1] Apache Camel: Why does Camel use too many threads with ProducerTemplate
> <
> http://camel.apache.org/why-does-camel-use-too-many-threads-with-producertemplate.html
> >
>
> Taariq Levack
>
> -----Original Message-----
> From: Ioannis Canellos [mailto:iocanel@gmail.com]
> Sent: 22 February 2011 20:55
> To: users@camel.apache.org
> Subject: Producer Template and number of ActiveMQ Producers.
>
> I am building an application that uses camel and activemq.
> Some of my routes are defined using spring and I also make uses of the
> @Produce annotations.
>
> I notice that on the when I add messages on an activemq queue using the
> "to"
> element a single producer is created on activemq.
> When I add messages using the @Produce annotation I notice multiple
> activemq producers.
>
> Are these two linked in any way? Can configure its behaviour somehow?
>
> Thanks in advance,
> *Ioannis Canellos*
>



-- 
*Ioannis Canellos*
http://iocanel.blogspot.com

Integration Engineer @ Upstream S.A. <http://www.upstreamsystems.com>

RE: Producer Template and number of ActiveMQ Producers.

Posted by Taariq Levack <ta...@itaro.co.za>.
Hi

This is in the FAQ[1]

In the first case the route is setup once and the template is created once.
How is @Produce used? If it's in a singleton it will also only be injected once,
but I assume it's in a bean invocation. 

[1] Apache Camel: Why does Camel use too many threads with ProducerTemplate <http://camel.apache.org/why-does-camel-use-too-many-threads-with-producertemplate.html>

Taariq Levack

-----Original Message-----
From: Ioannis Canellos [mailto:iocanel@gmail.com] 
Sent: 22 February 2011 20:55
To: users@camel.apache.org
Subject: Producer Template and number of ActiveMQ Producers.

I am building an application that uses camel and activemq.
Some of my routes are defined using spring and I also make uses of the @Produce annotations.

I notice that on the when I add messages on an activemq queue using the "to"
element a single producer is created on activemq.
When I add messages using the @Produce annotation I notice multiple activemq producers.

Are these two linked in any way? Can configure its behaviour somehow?

Thanks in advance,
*Ioannis Canellos*