[
https://issues.apache.org/jira/browse/CAMEL-10845?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-10845.
---------------------------------
Resolution: Fixed
> 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, eip
> 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)