Hello, I tried to implement my own route policy, you can have a look at code here: https://github.com/gquintana/camel/compare/locking-routepolicy It's only a prototype at the moment, I didn't test my code in real app, there are some unit tests though.
Yet I'm a bit puzzled: 1. From a route policy I can't prevent a route from starting, the best I could do is stop/suspend it right after having started. Some exchanges could have been processed in the meanwhile 2. If I control route state from a route policy, then the route policy is reentrant. As a result I had to cheat to prevent recursive calls 3. It's hard to protect shared state (route lock, route info) from multiple threads access At this point, I am open for improvement and advice. Gérald -- View this message in context: http://camel.465427.n5.nabble.com/Master-Slave-failover-using-database-lock-tp5746646p5748198.html Sent from the Camel - Users mailing list archive at Nabble.com.