hello,
I have write some code to start camel in Standalone mode , with some
routes . But how do I make the roue addition dynamic without restarting the
camel instance. I will be updating the route dynamically based on some
triggers in my application. Looking at the standalone approach I dont see it
possible without restarting the camel instance.
Below is my code
// create a Main instance
main = new Main();
main.enableHangupSupport();
// add routes
main.addRouteBuilder(new
CustomDynamicRouteBuilderWithoutContext("rabbitmq://localhost/"+EXCHANGE_NAME+"?autoDelete=false&queue="+QUEUE_NAME+"&username=guest&password=guest&routingKey="+ROUTING_KEY,"stream:out","XML"));
main.addRouteBuilder(new
CustomDynamicRouteBuilderWithoutContext("select * from
TBL_DB","stream:out","DB"));
// incase of DB need to provide Datasource Object
main.bind("DS",setupDataSource1("jdbc:oracle:thin:@nero2:15521:FYR"));
// enable hangup support so you can press ctrl + c to
terminate
the JVM
// run until you terminate the JVM
System.out.println("Starting Camel. Use ctrl + c to
terminate the
JVM.\n");
main.run();
How do I add new routes without restarting the camel application, is there
any way or other approach I could try.
regards,
Felix T
--
View this message in context:
http://camel.465427.n5.nabble.com/Dynamic-Routes-aadition-in-Standalone-application-tp5769018.html
Sent from the Camel - Users mailing list archive at Nabble.com.