You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Aaron Whiteside (JIRA)" <ji...@apache.org> on 2015/10/26 23:41:27 UTC

[jira] [Commented] (CAMEL-8610) Add support for dynamic XML route templates

    [ https://issues.apache.org/jira/browse/CAMEL-8610?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14975256#comment-14975256 ] 

Aaron Whiteside commented on CAMEL-8610:
----------------------------------------

Java routes might still take advantage of this (the property placeholder replacement), sure you could do it manually in java code.. but a java template route could still be at parity with xml.

> Add support for dynamic XML route templates
> -------------------------------------------
>
>                 Key: CAMEL-8610
>                 URL: https://issues.apache.org/jira/browse/CAMEL-8610
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-core
>    Affects Versions: 2.15.1
>            Reporter: Aaron Whiteside
>             Fix For: Future
>
>
> Add support for dynamic route templates
> {code:xml}
> <route id="my-template" template="true">
>   <from uri="{{myendpoint}}"/>
>   <to uri="seda:{{seda.name}}?size={{seda.size:10}}"/>
> </route>
> {code}
> {code:java}
> CamelContext.startRouteFromTemplate(String templateRouteId, String newRouteId, Map<String,Object> templateProperties);
> {code}
> Usage would be something like:
> {code:java}
>  Map map = new HashMap<>();
>  map.put("myendpoint", "direct:hello");
>  map.put("seda.name", "test");
>  camelContext.startRouteFromTemplate("my-template", "my-new-route-1", map);
> // or
>  camelContext.startRouteFromTemplate("my-template", null, null); // auto assign new route id and supply no specific properties.
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)