Active MQ with Camel on Fuse - How to?
stepha.dereppe Apr 8, 2015 6:25 AMHello,
I'm tring to play around with Active MQ and Camel on a local Fuse instance.
Here is what I've done.
1/ Create a child container that run the mq-default profile (the broker)
2/ Create a new Camel Project with the following camelContext (I started from a given maven archetype):
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:amq="http://activemq.apache.org/schema/core" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd"> <bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent"> <property name="brokerURL" value="discovery:(fabric:default)"/> </bean> <camelContext xmlns="http://camel.apache.org/schema/spring"> <route id="fileToMessage"> <from uri="file:C:\\CamelTest\\In"/> <to uri="activemq:personnel.records"/> </route> <route id="consumeMessageToFile"> <from uri="activemq:personnel.records"/> <choice> <when> <xpath>/person/city = 'London'</xpath> <to uri="file:C:\\CamelTest\\Out\\messages\\uk"/> </when> <otherwise> <to uri="file:C:\\CamelTest\\Out\\messages\\others"/> </otherwise> </choice> </route> </camelContext> </beans>
I create a profile with this bundle and assign it to another child container.
I receive this error
Failed delivery for (MessageId: ID-PORT-STEDE-50609-1428487890125-0-4947 on ExchangeId: ID-PORT-STEDE-50609-1428487890125-0-4948). Exhausted after delivery attempt: 1 caught: org.springframework.jms.IllegalStateException: javax.jms.JMSException: Stopped.; nested exception is javax.jms.IllegalStateException: javax.jms.JMSException: Stopped.
Can someone help me? I don't know what I do wrong...
Thanks.
Stéphane