How to use a dynamic URI in
A dynamic URI is an endpoint URI that varies depending on inflight routing information, such as Exchange properties, message headers, the body, the Camel Context, etc.
Dynamic To - out of the box
From Camel 2.16 onwards there is a new
For example, if you’re using a Freemarker producer and the template location is provided inside the current message, you might expect the following code to work, but it will not.
This is not valid code
This snippet is not valid code. Read on.
For example, rewriting the snippet above to use the Simple expression language:
This is valid code
This snippet is valid code.
Or you could use any other of Camel Languages.
Notice that the Recipient List can send to multiple Endpoints if the expression returns either a
For example, to turn it, when using Camel 2.13 onwards:
And for users of Camel 2.12.x or older, we use a non existing delimiter char: