camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From huntc <hu...@mac.com>
Subject Re: Unexpected ActiveMQ FailoverTransport messages in my log
Date Mon, 19 Jan 2009 06:18:00 GMT

OK - now I remember.. you have to use a pooled connection factory when
producing to a queue as per:

http://activemq.apache.org/jmstemplate-gotchas.html

The crazy thing is that I knew that, but I had just forgotten.

Given that my Camel application both produces and consumes on queues I have
now created two connection components:


  &lt;!-- Set up ActiveMQ --&gt;
  &lt;bean id="activemq-receiver"
class="org.apache.activemq.camel.component.ActiveMQComponent"&gt;
    &lt;property name="connectionFactory"&gt;
      &lt;bean class="org.apache.activemq.ActiveMQConnectionFactory"&gt;
        &lt;property name="brokerURL"
          value="${mybrokerurl}" /&gt;
      &lt;/bean&gt;
    &lt;/property&gt;
  &lt;/bean&gt;
  &lt;bean id="activemq-sender"
class="org.apache.activemq.camel.component.ActiveMQComponent"&gt;
    &lt;property name="connectionFactory"&gt;
      &lt;bean class="org.apache.activemq.pool.PooledConnectionFactory"&gt;
        &lt;constructor-arg value="${mybrokerurl}" /&gt;
      &lt;/bean&gt;
    &lt;/property&gt;
  &lt;/bean&gt;


I hope that this thread is a useful reminder for what would probably be a
common trap. Would this be worth being included on the ActiveMQ component
page?

http://activemq.apache.org/camel/activemq.html

Kind regards,
Christopher
-- 
View this message in context: http://www.nabble.com/Unexpected-ActiveMQ-FailoverTransport-messages-in-my-log-tp21512906s22882p21537495.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message