i m using a queue in my camel route, i m sending some data to it and after
that i m processing it, after processing i m sending the processed data to
the same queue. Though i m getting the processed data, there will be a temp
queue which is generated system and is sending the data back to the queue so
that it is getting into the loop. Below is my routing  code.


                        //from("file://E://Target//createPolicy")
                        
from("activemq:queue:TestCreatePolicy?replyToDeliveryPersistent=false")
                                        
.routeId("activemq-queue-TestCreatePolicy")
                                        
//.setExchangePattern(ExchangePattern.InOut)
                                        
                                        //.convertBodyTo(String.class)
                                        .setHeader("JMSCorrelationID", 
constant("abcd789"))
                                        .log("Before Processing")
                                        
//.transacted(PropagationPolicy.PROPAGATION_REQUIRED)
                                        .convertBodyTo(Document.class)
                                        .log("After Processing")
                                        
                                        .to("freemarker:createpolicy.ftl")
                                        .log("Placed in ftl")
                                        
.setHeader("operationName",simple("createPolicy"))
                                        .log("Header Set")
                                        .to(cxfEndpoint("create-policy"))
                                        .to("log:reply")
                                        .convertBodyTo(String.class)
                                        .process { Exchange e ->
                                                Message msg = e.getIn();
                                                String id= e.CORRELATION_ID;
                                                log.info("CXF Response : " +id  
+msg.toString());
                                                //e.getIn().setBody(msg);
                                                
                                                
                                        }
                                        
                                        .to("activemq:queue:TestCreatePolicy");
                                        //.to("file://E://Target//Response");
                                        }

So my question is how can i get out of that loop..pls help me out



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/About-the-temporary-queue-creation-tp4699319.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

Reply via email to