You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

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.

  • No labels