Hi 

I am newbie with Camel and it seems to be very powerful framework. One thing
that I haven't found out yet is that how can you create routes
programmatically/dynamically? 

So let's say I created following code :

  camel = new DefaultCamelContext();
        
        
       
        camel.addRoutes(new RouteBuilder() {
        
            
            @Override
                public void configure() throws Exception {
                
               
               from("file:C:\\FtpTestFolders\\FtpOut?delete=true")
                       
                       .setHeader(Exchange.FILE_NAME,
constant("TestiPrkl.txt"))
                      .to("file:C:\\FtpTestFolders\\FtpIn")
                       .setHeader(Exchange.FILE_NAME,
constant("ToinenTestiPrkl.txt"))
                       .to("file:C:\\FtpTestFolders\\FtpError");
                        //Here I may or may not want to add other headers,
endpoints and processors 

                
            }
            
        });

This is fine but what if I have defined my headers and endpoint in somewhere
else (db/file/etc) and I wan't to create routes based on these dynamically.
The API is quite complex so if someone could post me an example I would
really appreciate it. 

Thank you

--
View this message in context: 
http://camel.465427.n5.nabble.com/Creating-routes-dynamically-tp4943107p4943107.html
Sent from the Camel Development mailing list archive at Nabble.com.

Reply via email to