Details
-
Type:
Bug
-
Status: Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 2.20.0
-
Component/s: camel-core
-
Labels:
-
Estimated Complexity:Unknown
Description
If you run the example and turn off the supervising
Then the routes are started correct order
2017-07-23 10:40:37.825 INFO 33034 --- [ main] o.a.camel.spring.SpringCamelContext : Route: bar started and consuming from: timer://bar?period=5s 2017-07-23 10:40:37.825 INFO 33034 --- [ main] o.a.camel.spring.SpringCamelContext : Route: foo started and consuming from: timer://foo?period=5s 2017-07-23 10:40:37.830 INFO 33034 --- [ main] o.a.c.c.undertow.DefaultUndertowHost : Starting Undertow server on http://localhost:9011 2017-07-23 10:40:37.877 INFO 33034 --- [ main] o.a.camel.spring.SpringCamelContext : Route: undertow started and consuming from: http://localhost:9011
eg with lowest startup order first, 1,2, (no number).
But if you turn on supervising, then they are started: (no number), 1, 2
2017-07-23 10:37:39.266 INFO 32985 --- [ main] o.a.c.c.undertow.DefaultUndertowHost : Starting Undertow server on http://localhost:9011 2017-07-23 10:37:39.311 INFO 32985 --- [ main] o.a.camel.spring.SpringCamelContext : Route: undertow started and consuming from: http://localhost:9011 2017-07-23 10:37:39.313 INFO 32985 --- [ main] o.a.camel.spring.SpringCamelContext : Route: bar started and consuming from: timer://bar?period=5s 2017-07-23 10:37:39.314 INFO 32985 --- [ main] o.a.camel.spring.SpringCamelContext : Route: foo started and consuming from: timer://foo?period=5s
eg the undertow route is the (no number) and should therefore be started last (it will have auto assigned number 1001).
eg we need to use the RouteStartupOrder that can tell the correct order.