camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-8610) Add support for dynamic route templates
Date Thu, 09 Jul 2015 10:24:05 GMT

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

Claus Ibsen commented on CAMEL-8610:
------------------------------------

This is for XML routes, as java routes is just java code and you can template this using java
code.

> Add support for dynamic 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)

Mime
View raw message