Hi,
you can start and stop routes from other routes. So if A has finished
processing it can start the other routes.
have a look here:
https://camel.apache.org/how-can-i-stop-a-route-from-a-route.html
best regards, Marco
Am 21.09.2012 18:30, schrieb Edwin:
Thanks for your reply Willem,
Apologies if I wasn't clear before. I have 6 routes in my application. Route
A, B, C, D, E, F
Before I start routes (B-F). Route A needs to complete any work assigned to
it. Route A in this instance takes messages from a JMS queue and places them
into a database. I need Route A to move all of the messages from the JMS
queue and insert them into the database before I can start Routes (B-F)
I came up with a potential solution, would be interested to see what folks
thought about it
Let's say:
boolean startCoreRoutes = false
from(dbJmsQueue).to(database).onComplete().onWhen(interogate the exchange to
determine there are no more messages coming from the queue =
true).process(inline processor - startCoreRoutes = true)
// poll the value of startCoreRoutes every x seconds
if (startCoreRoutes){
buildCoreRoutes();
}
void buildCoreRoutes() {
// build core routes
}
Any insights are much appreciated.
Thanks,
Edwin
--
View this message in context:
http://camel.465427.n5.nabble.com/Starting-route-s-upon-completion-of-another-route-tp5719681p5719730.html
Sent from the Camel - Users mailing list archive at Nabble.com.