Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-14053

Routes Loader SPI

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.9.0
    • camel-core-api
    • None
    • Unknown

    Description

      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:

      Main main = new Main()
      main.addRoutes(
          "classpath:my.company.MyRouteImpl.class",
          "file:/etc/camel/integration.js",
           ...
      );
      
      main.run()
      

      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:

      Routes.load(context, "file:/etc/camel/integration.js");
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              lb Luca Burgazzoli
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: