Hi Jonathan, I think we would like to address this with health checks[1], some of which shipped in 2.19.0 and we would like to improve on this.
Perhaps it would be nice to tie health checks this into control bus and let the user define a policy on how to handle failures. But this is somewhat new territory that's still being developed, so perhaps if you're aware in advance of the database being unavailable you can use `camel:route-stop` to stop the route and `camel:route-start` to start it when the database is back online. zoran [1] https://issues.apache.org/jira/browse/CAMEL-10026 On Tue, May 16, 2017 at 3:39 PM, Jonathan Schoreels <jonathan.schore...@gmail.com> wrote: > Hi all, > > It seems that if a database is unreachable, and if the camelcontext > contains a sql consumer, the camel context won't start, even though marked > as Created in karaf console. > > I don't mind the karaf "created" marked, but I would love to know if you > have any advice to startup sql route when the DB may be down, for example > if after a maintenance, the karaf is faster than the DB to restart. > > A workaround found is to use a timer before, and the sql query in a > pollEnrich just after, but it's quite dirty. > > You can find the whole stack here : > https://pastebin.com/XvYpCjZK > > Jonathan Schoreels -- Zoran Regvart