Hello Claus,

This looks very interesting!

If I understand correctly, with this change, we'll be able to replace the
usage of KameletMain in CAMEL-16612 [1] and then we can load all sorts of
routes out of the box, without relying on or implementing different kinds
of "Main".

So, if my understanding is correct, then it will make it much easier to
load them on Camel JBang as the new loader does the bulk of the work.

In terms of ideas ...

One scenario that I have been thinking of - but haven't fully matured yet -
is whether it's worth pursuing a type of "pipe into/out of shell" feature
for CAMEL-16612. Specifically: whether we could modify Camel JBang so that
we could use it as part of shell scripts. For example:

CamelJBang run /path/to/route.yaml | ... shell script stuff here (sed,
grep, awk, etc)

One challenge is that we need to find a way to flexibilize the end of the
execution dynamically. Maybe even from the standard input ... so that would
behave similar to this:

- echo "<some yaml with termination rule>" |  CamelJBang run
/path/to/route.yaml | ... shell script stuff here (sed, grep, awk, etc)

or

- CamelJBang run /path/to/route.yaml /path/to/termination.yaml | ... shell
script stuff here (sed, grep, awk, etc)

With this, we might be able to offer a client that plugs everything to
everything almost out of the box and is easily scriptable in shell.

Obs.: enjoy your PTO!

1. https://github.com/apache/camel/pull/5770

Kind regards

On Thu, Jul 8, 2021 at 2:12 PM Claus Ibsen <claus.ib...@gmail.com> wrote:

> Hi
>
> I am working on (branch on git with the ticket number)
> https://issues.apache.org/jira/browse/CAMEL-16757
>
> Its work in progress, but I got a prototype in a new example
>
> https://github.com/apache/camel-examples/tree/main/examples/routes-configuration
>
> In this example we have routes in java, xml and yaml in the myroutes
> folder. For Java you can of course also have it in src/main/java.
>
> But the point is to make this work for dynamic loaded routes (also
> Java) and hence why its in the myroutes folder.
>
> These routes causes exceptions, and then we have global configured
> error handling in separate source code, in the myerror folder.
>
> Those are also polyglot and you can define this in XML, YAML or Java etc.
>
> There is more to work on but wanted to share the heads-up.
> I will be on PTO 2 weeks from tomorrow afternoon. So will work on
> finishing this later.
>
> The potential is also to allow users to define their global error
> handler, route configurations, and you can put that into separate JAR
> and just add as dependency. And then you can refer to these route
> configurations from your routes or to use the global configured etc.
>
> Feedback is welcome, the work is "not set in stone".
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>


-- 
Otavio R. Piske
http://orpiske.net

Reply via email to