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 2019/12/13 16:06:00 UTC

[jira] [Created] (CAMEL-14297) Introduce RouteBuilderConfigurer

Luca Burgazzoli created CAMEL-14297:
---------------------------------------

             Summary: Introduce RouteBuilderConfigurer
                 Key: CAMEL-14297
                 URL: https://issues.apache.org/jira/browse/CAMEL-14297
             Project: Camel
          Issue Type: New Feature
          Components: camel-core
            Reporter: Luca Burgazzoli
            Assignee: Luca Burgazzoli
             Fix For: 3.1.0


We could introduce a RouteBuilderConfigurer interface that would allow to reduce the ceremony needed to set up routes especially when working with CDI/Spring environments like:

{code:java}
@Produce
RouteBuilderConfigurer myRoutes() {
    return builder -> builder.from("").to("")
}
{code}

Would be even shorter in kotlin:

{code:kotlin}
@Produce
fun myRoutes: RouteBuilderConfigurer = builder -> builder.from("").to("")
{code}

A similar idea is implemented in [RouteBuilder|https://github.com/apache/camel/blob/67139e00133b5d276a6eafeea292385089b233b0/core/camel-core-engine/src/main/java/org/apache/camel/builder/RouteBuilder.java#L100-L107] 

[~davsclaus] does it make sense ?



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