How do I use dynamic URI in To
I want to use a dynamic URI when sending to an endpoint. How do I do that?
For example where the template name is dynamic as shown below:
to("freemarker://templateHome/${body.templateName}.ftl")
Use the Recipient List EIP pattern, which allows you to compute the dynamic URI using an Expression.
For example using the Simple expression language as shown below:
recipientList(simple("freemarker://templateHome/${body.templateName}.ftl"))
Or use any of the other Languages.