Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

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:

Code Block
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:

Code Block
recipientList(simple("freemarker://templateHome/${body.templateName}.ftl"))

Or use any of the other Languages.