camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edwin <>
Subject Re: Starting route(s) upon completion of another route
Date Fri, 21 Sep 2012 16:30:26 GMT
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){

void buildCoreRoutes() {
// build core routes

Any insights are much appreciated.


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message