You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Luca Burgazzoli (Jira)" <ji...@apache.org> on 2021/02/24 08:50:00 UTC

[jira] [Resolved] (CAMEL-14053) Routes Loader SPI

     [ https://issues.apache.org/jira/browse/CAMEL-14053?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Luca Burgazzoli resolved CAMEL-14053.
-------------------------------------
    Resolution: Fixed

> Routes Loader SPI
> -----------------
>
>                 Key: CAMEL-14053
>                 URL: https://issues.apache.org/jira/browse/CAMEL-14053
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-core-api
>            Reporter: Luca Burgazzoli
>            Priority: Major
>             Fix For: 3.x
>
>
> Both camel-quarkus and camel-k have now a concept of routes loader which allow to customize how and if routes are loaded in the case of camel-quarkus or to provide support for routes written in additional languages in the case of camel-k.
> It would be nice to introduce an official SPI in camel and leverage as example in camel-main, so one could write something like:
> {code:java}
> Main main = new Main()
> main.addRoutes(
>     "classpath:my.company.MyRouteImpl.class",
>     "file:/etc/camel/integration.js",
>      ...
> );
> main.run()
> {code}
> And loading of the routes is the delegated to a loader discovered by camel using the SPI mechanic.
> We could also provide some helpers similar to what we have as today to load XML routes like:
> {code:java}
> Routes.load(context, "file:/etc/camel/integration.js");
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)