I found my error here http://activemq.apache.org/xml-reference.html
my mistake depending on fuse message broker documentation.
However now I have a problem to configure activemq inside fuse esb to redelivery messages when the message broker does not shutdown properly.
For my project I use camel and activemq.
This is my camel-context.xml:
<camelContext
+ xmlns="http://camel.apache.org/schema/spring" +
+ xmlns:person="http://servicemix.apache.org/samples/wsdl-first">+
<route>
<from uri="jbi:endpoint:http://servicemix.apache.org/samples/wsdl-first/PersonService/soap" />
+ <to uri="log:pass_1" />+
+ <convertBodyTo type="java.lang.String"/>+
+ <to uri="activemq:topic:codaIn" />+
+ </route>+
+ <route>+
+ <from uri="activemq:topic:codaIn?clientId=testCamelClient&durableSubscriptionName=TopicReader1" />+
+ <multicast>+
+ <to uri="activemq:topic:coda1" />+
+ <to uri="activemq:topic:coda2" />+
+ <to uri="activemq:topic:coda3" />+
+ </multicast>+
</route>
<route errorHandlerRef="errorHandler">
<from uri="activemq:topic:coda1" />
+ <to uri="jbi:endpoint:http://servicemix.apache.org/samples/wsdl-first/PersonServiceT/soapT" />+
+ </route>+
<route errorHandlerRef="errorHandler">
<from uri="activemq:topic:coda2" />
+ <to uri="jbi:endpoint:http://servicemix.apache.org/samples/wsdl-first/PersonServiceP/soapP" />+
+ </route>+
<route errorHandlerRef="errorHandler">
<from uri="activemq:topic:coda3" />
+ <to uri="jbi:endpoint:http://servicemix.apache.org/samples/wsdl-first/PersonServiceN/soapN" />+
+ </route>+
+ +
+ <route errorHandlerRef="errorHandler">+
<from uri="activemq:topic:errori" />
+ <to uri="jbi:endpoint:http://servicemix.apache.org/samples/wsdl-first/PersonServiceP/soapP" />+
+ </route>+
</camelContext>
+ <bean id="errorHandler" class="org.apache.camel.builder.DeadLetterChannelBuilder">+
+ <property name="deadLetterUri" value="activemq:topic:errori"/>+
+ <property name="redeliveryPolicy" ref="myRedeliveryPolicyConfig"/>+
+ </bean>+
+ <bean id="myRedeliveryPolicyConfig" class="org.apache.camel.processor.RedeliveryPolicy">+
<property name="maximumRedeliveries" value="-1"/>
+ </bean>+
+ <bean id="myRedeliveryPolicyConfig2" class="org.apache.activemq.RedeliveryPolicy">+
<property name="maximumRedeliveries" value="-1"/>
+ </bean>+
<bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent">
<property name="configuration" ref="jmsConfig"/>
</bean>
<bean id="jmsConfig" class="org.apache.camel.component.jms.JmsConfiguration">
<property name="connectionFactory" ref="jmsConnectionFactoryProcess"/>
+ </bean>+
<bean id="jmsConnectionFactoryProcess" class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL" value="tcp://localhost:61616"/>
<property name="redeliveryPolicy" ref="myRedeliveryPolicyConfig2" />
</bean>
With this configuration when I send a message, and for example the endpoint PersonServiceP is down, the message broker continue to redelivery message.
My problem is when a message continue to be redelivery and in the meanwhile occur a disaster and the fuse esb go down!
At the startup the message isn't redelivery....and I obtain a message lost!
How can I avoid this problem?
Edited by: joe on Mar 23, 2010 8:24 AM