Luigi De Masi created CAMEL-16058:
-------------------------------------

             Summary: [camel-core] There is no option to configure 
allowOptimisedComponents in toD EIP using Java DSL
                 Key: CAMEL-16058
                 URL: https://issues.apache.org/jira/browse/CAMEL-16058
             Project: Camel
          Issue Type: Improvement
          Components: camel-core
            Reporter: Luigi De Masi


There is no option to configure allowOptimisedComponents for toD EIP using Java 
DSL.
The only option available is to define a {{ToDynamicDefinition}} and add it to 
the route definition, for example:

{code:java}
public class TestRouteBuilder extends RouteBuilder {

    @Override
    public void configure() throws Exception {

        ToDynamicDefinition tdd = new ToDynamicDefinition();
        tdd.setUri("direct:${header.whereto}");
        tdd.setIgnoreInvalidEndpoint(false);
        tdd.setPattern(ExchangePattern.InOut);
        tdd.setAllowOptimisedComponents(true);
        
        RouteDefinition route = 
                from("direct:start")
                .log(LoggingLevel.INFO, "This is a test");
        
        route.addOutput(tdd);
    }
}
{code}




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

Reply via email to