Hi The startupOrder feature was intended in earlier days when some components had to be started before others. But Camel in general is starting up things better over the years, and this feature is much less in need.
So what is it that you have in your routes that you think you need to dictate an order? And you can also structure your routes in the RouteBuilder from top to bottoom in the order you need. On Fri, Apr 28, 2023 at 3:24 PM Schmeier, Jannik <j.schme...@fraport.de> wrote: > Hi all, > > I'm using Apache Camel 3.4.4 in a Spring Boot 2.3.12 application. I know, > that these aren't the most recent versions, but I'm currently not able to > update to newer ones. > > I'm trying to add a route builder dynamically after the camel context has > already been started like so: > > camelContext.addRoutes(routeBuilder); > > In general this is working and my routes are being added and started. > However, adding a route builder like that doesn't seem to respect the > startup orders that I have defined for my routes in that route builder. > They're being started in the order that they're defined in the route > builder. > > The issue seems to be that inside this method > https://github.com/apache/camel/blob/camel-3.4.4/core/camel-core-engine/src/main/java/org/apache/camel/impl/DefaultCamelContext.java#L346 > the route services are being started one after the other and not all > together, resulting in the call to the internal startup order manager in > https://github.com/apache/camel/blob/camel-3.4.4/core/camel-base/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java#L3070 > basically being useless. > > Does anyone know a way around this in Camel 3.4.4? > > Best regards, > Jannik > > -- Claus Ibsen ----------------- @davsclaus Camel in Action 2: https://www.manning.com/ibsen2