Hi ,

I am new to Apache Camel. I am facing this problem..

 Depending on message coming from activemq , i have to select the
appropriate route .. 

// a bean which is sending message to activemq using jms
 from("bean:idProducer?method=sendMessage").to("jms:queue:myqueue1");
   
// from message coming from activemq.. if user send ftp as message i need to
incoke route1 or route 2
        from("jms:queue:myqueue1")
        .choice()
               
.when(body().contains("ftp")).to("bean:mediationSource?method=ftpServer")
                                       
.to("bean:mediationSource?method=localLocation")
                                       
.to("bean:mediationSource?method=pickFile")
                                        .beanRef("ggsnToBdrProcessor")
         
       
.when(body().contains("local")).to("bean:mediationSource?method=localDataLocation")
                                       
.to("bean:mediationSource?method=pickFile")
                                        .beanRef("ggsnToBdrProcessor");


what could i do in this regard and i want to consume the jms message only
once and run the routes.

Thanks in advance

--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-invoke-a-route-based-on-incoming-ftp-message-tp5643121p5643121.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to