Hello, I define all my routes in spring (camel 2.6, smx 4.3) but some of the routes id like to not automatically start when the spring is started. I notice in RoutePolicy it shows a route with autoStartup being false:
This is what I want to do with some of my routes(not to start from the get go), but whats a good way to start them started based on some runtime logic later on? Would it be to create a bean implementing CamelContextAware and then get the routes by name and start them?
You can start the routes using JMX and from java code, using the CamelContext API. There is a startRoute(id) method for that. Yes for example as a bean and have CamelContext injected.