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:


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


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.

Reply via email to