How to use a dynamic URI in to()
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.
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.
For example, rewriting the snippet above to use the Simple expression language:
Or you could use any other of Camel Languages.