Ah yeah we need a timeout that takes a string value .pollEnrich("myUrl).timeout("xxx")....
I just added that to 3.19 and 3.18.x On Tue, Sep 6, 2022 at 4:46 PM ski n <raymondmees...@gmail.com> wrote: > I like to create a route template with a parameter of a specific Java type. > > For example the following routetemplate: > > routeTemplate("mypollenrich") > .templateParameter("timeout","5000") > .from("direct:in") > .pollEnrich("myuri", "{{timeout}}","CurrentEnrichStrategy") > .to("direct:out"); > > The above routetemplate is not accepted because the parameter "{{timeout}}" > is a String, while a long is expected. Is it possible to pass the parameter > as a long (and in general just any Java type)? > > I now tried to parse the String as Long like this: > > routeTemplate("mypollenrich") > .templateParameter("timeout","5000") > .from("direct:in") > .pollEnrich("myuri", > Long.parseLong("{{timeout}}"),"CurrentEnrichStrategy") > .to("direct:out"); > > But doesn't seem allowed. What is the correct way of doing it? > > Raymond > -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2