You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2019/08/06 09:43:00 UTC

[jira] [Updated] (CAMEL-10845) Java 8 DSL : add support for Suppliers

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

Claus Ibsen updated CAMEL-10845:
--------------------------------
    Priority: Major  (was: Minor)

> Java 8 DSL : add support for Suppliers
> --------------------------------------
>
>                 Key: CAMEL-10845
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10845
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Luca Burgazzoli
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 3.0.0
>
>
> One of the things that was missing in previous Java 8 DSL improvement rounds was the possibility to use Suppliers to provides objects to the routes.
> As today:
> {code:java}
>     from("direct:start")
>         .idempotentConsumer()
>             .header("messageId")
>             .messageIdRepository(createRepo())
>         .to("mock:result");
> {code}
> With suppliers:
> {code:java}
>     from("direct:start")
>         .idempotentConsumer()
>             .header("messageId")
>             .messageIdRepository(this::createRepo)
>         .to("mock:result");
> {code}
> Adding that does not result in such a big improvement for the DSL but it adds some overhead to the underlying definitions as we may need to add additional variables to hold the suppliers and other stuffs to convert suppliers i.e. to expression clause so we should have a look at this issue in Camel 3.0 (where we may have the chance to do a deeper refactor and suppliers may play better).



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)