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 <[email protected]> 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:[email protected]] > Sent: 22 February 2011 20:55 > To: [email protected] > 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>
