Raymond created CAMEL-18647:
-------------------------------

             Summary: Set delay options in route delay
                 Key: CAMEL-18647
                 URL: https://issues.apache.org/jira/browse/CAMEL-18647
             Project: Camel
          Issue Type: New Feature
    Affects Versions: 3.19.0
            Reporter: Raymond


In the current Java DSL you can set the delay as follows:



 
{code:java}
routeTemplate("xmltojson-action")
.templateParameter("in")
.templateParameter("delayTimeout","5000")
.templateParameter("out")
.from("{{in}}")
   
.delay().constant("{delayTimeout}}").syncDelayed().callerRunsWhenRejected(false)
   .to("{{out}}");
{code}
 

I would like to make the options configurable:

 
{code:java}
routeTemplate("xmltojson-action")
.templateParameter("in")
.templateParameter("delayTimeout","5000")
.templateParameter("asyncDelayed","true")  
.templateParameter("callerRunsWhenRejected","true")  
.templateParameter("out")
.from("{{in}}")
   .delay().constant("{{delayTimeout}}")
          .asyncDelayed("{{asyncDelayed}}")
          .callerRunsWhenRejected("{{callerRunsWhenRejected}}")
   .to("{{out}}");


{code}
 

 



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

Reply via email to