There is something interesting about Camel Routes.

Usually they are defined in the beginning and assumed to have the same endpoints. But today I had a situation when depending on the .process() execution the result endpoint had to be dynamic.

So after consulting with one of my colleagues I found the following solution:

BUT THIS DOES NOT WORK … the problem is about to()

you have to use .toD() instead.

check http://camel.apache.org/message-endpoint.html – the “Dynamic To” part.

Hope this helps you 😉

LEAVE A REPLY

Please enter your comment!
Please enter your name here