You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by Claus Ibsen <cl...@gmail.com> on 2021/01/22 14:59:40 UTC

[HEADS UP] - Earlier route initializing coming in Camel 3.8

Hi

The JIRA ticket
https://issues.apache.org/jira/browse/CAMEL-15844

Was a reminder to me to work on making Camel startup its routers in a
better way.

The startup procedure is somewhat complex as it takes factors into
account, to check for duplicates, prepare for error handling and
whatnot.

Nevertheless the need is here now with the optimised core, to make
Camel routes startup in "2 separate cycles" - init and start.

So the work is ongoing to move logic to initialise routes as part of
CamelContext itself.
This helps to "fail faster" in case of problems, but also to take
advantage of modern frameworks that can do build time optimisations
such as quarkus / graalvm. Also it helps to wire up, configure and
whatnot all the routes, eips, and whatelse is in use in the routes,
and get all of that work done, before any of the routes and its
services are started. So its a cleaner approach, and also matches the
Service contract in Camel with init and start phases.

One affect that is pending to find out what to do is that Camel routes
now would have their status reported as "Initialised" instead of
"Stopped" as before (Stopped referring to the "null" state). We have a
bunch of unit test that rely on this, so until then I have made the
status as before (Stopped) but when its in fact initialised.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Re: [HEADS UP] - Earlier route initializing coming in Camel 3.8

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Just a heads up that I have pushed the code changes to the master branch.
There is a note in the 3.8 upgrade guide about its affect on custom
Camel components.



On Fri, Jan 22, 2021 at 3:59 PM Claus Ibsen <cl...@gmail.com> wrote:
>
> Hi
>
> The JIRA ticket
> https://issues.apache.org/jira/browse/CAMEL-15844
>
> Was a reminder to me to work on making Camel startup its routers in a
> better way.
>
> The startup procedure is somewhat complex as it takes factors into
> account, to check for duplicates, prepare for error handling and
> whatnot.
>
> Nevertheless the need is here now with the optimised core, to make
> Camel routes startup in "2 separate cycles" - init and start.
>
> So the work is ongoing to move logic to initialise routes as part of
> CamelContext itself.
> This helps to "fail faster" in case of problems, but also to take
> advantage of modern frameworks that can do build time optimisations
> such as quarkus / graalvm. Also it helps to wire up, configure and
> whatnot all the routes, eips, and whatelse is in use in the routes,
> and get all of that work done, before any of the routes and its
> services are started. So its a cleaner approach, and also matches the
> Service contract in Camel with init and start phases.
>
> One affect that is pending to find out what to do is that Camel routes
> now would have their status reported as "Initialised" instead of
> "Stopped" as before (Stopped referring to the "null" state). We have a
> bunch of unit test that rely on this, so until then I have made the
> status as before (Stopped) but when its in fact initialised.
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2