Hi,
   I use apache camel for routing  and activemq for messages. 
   I have defined a route with multiple steps in it. 
   In the routing process at any step, if there are any exceptions, I am
sending the orignal message to the 
   "REPROCESSTOPICS" jms topic ( the idea is to reprocess them later)
   
   The problem that I see is, I do see the messages in the "REPROCESSTOPICS"
topic when the activemq   broker is up and running( if there are any
exceptions). Once I stop the broker and restart it, I no longer see my
previous messages in "REPROCESSTOPICS" topic.  So my question is how can we
persist these messages while the activemq broker restart.

Here is my configuration.

<?xml version="1.0" encoding="UTF-8"?>

<!-- Configure the Camel Context-->
<beans  xmlns="http://www.springframework.org/schema/beans";
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
                xmlns:cxf="http://camel.apache.org/schema/cxf";
                        
                xsi:schemaLocation="http://www.springframework.org/schema/beans 
   
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
                                    
http://activemq.apache.org/camel/schema/spring
http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
                                    http://camel.apache.org/schema/cxf
http://camel.apache.org/schema/cxf/camel-cxf.xsd
                                    http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd";>



        <bean id="jmsConnectionFactory"
class="org.apache.activemq.ActiveMQConnectionFactory">
                <property name="brokerURL"
value="tcp://localhost:61616?jms.redeliveryPolicy.maximumRedeliveries=-1" />
        </bean>
        
        
        <bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
                <property name="connectionFactory" ref="jmsConnectionFactory" />
                <property name="useMessageIDAsCorrelationID" value="true" />
        </bean>
        
        
        <camelContext xmlns="http://camel.apache.org/schema/spring";>
                <package>Services</package>
                
                <onException useOriginalMessage="true" >
                        <exception>java.lang.Throwable</exception>
                        <redeliveryPolicy maximumRedeliveries="3" />
                        <handled>
                        <constant>true</constant>
                </handled>
                        <to  
uri="jms:topic:REPROCESSTOPICS?maxMessagesPerTask=-1&amp;deliveryPersistent=true"
/> 
                </onException>
                
             
                
                <route>
                        <from uri="jms:topic:SOURCETOPICS" /> 
                         step2
                         step3
                         step4
                         ...
                 </route>
          </camelContext>
</beans>
         
-- 
View this message in context: 
http://old.nabble.com/Messages-not-getting-persisted-tp28485981p28485981.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to