You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Raymond (Jira)" <ji...@apache.org> on 2022/07/31 12:00:00 UTC

[jira] [Created] (CAMEL-18328) RouteConfiguration with RouteTemplate doesn't work

Raymond created CAMEL-18328:
-------------------------------

             Summary: RouteConfiguration with RouteTemplate doesn't work
                 Key: CAMEL-18328
                 URL: https://issues.apache.org/jira/browse/CAMEL-18328
             Project: Camel
          Issue Type: Bug
    Affects Versions: 3.18.0
            Reporter: Raymond


I have loaded a routeConfiguration:


{code:java}
<routeConfiguration id="myError">
            <onException>
               <exception>java.lang.Exception</exception>
               <handled>
                  <constant>true</constant>
               </handled>
               <redeliveryPolicy maximumRedeliveries="0" redeliveryDelay="5000"/>
               <setExchangePattern pattern="InOnly"/>
               <to uri="log:myError?showAll=true&amp;multiline=true"/>
            </onException>
         </routeConfiguration>{code}

I have a RouteTemplate:
{code:java}
         routeTemplate("myTemplate")
                 .templateParameter("in")
                 .templateParameter("out")
                 .from("{{in}}")
                     .routeConfigurationId("myError")
                     .to("{{out}}");{code}

But this routeConfigurationId doesn't seem to take effect. When calling the routeConfigurationId directly from a route is works.

Can you reproduce this?

BTW: What I try to achieve:


{code:java}
         routeTemplate("myTemplate")
                 .templateParameter("routeconfiguration_id","defaultErrorHandler")
                 .templateParameter("in")
                 .templateParameter("out")
                 .from("{{in}}")
                     .routeConfigurationId("{{routeconfiguration_id}}")
                     .to("{{out}}");{code}
Thus adding the routeConfigurationID through a templateParameter.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)