Sometimes you have to use the Simple Language to determine the endpoint URI in the Spring DSL.
For example suppose the input message contains the (to endpoint URI) in an attribute called “targetID”. if you used the normal definition like the following:

<route>
<camel:from uri="vm://add"/>
<camel:to uri="vm://${in.body[0].targetID}"/>
</route>

You will end up with Camel trying to create a queue called “${in.body[0].targetID}” not its value.

in order to avoid this you can use the EIP Reception List which allow you to define a set of recipients, and inside the recipient list you can use the Simple Language as the following:

<route>
<camel:from uri="vm://add"/>
<camel:recipientList>
<camel:simple>vm://${in.body[0].targetID}</camel:simple>
</camel:recipientList>
</route>

in this case the Camel creates a queue with the value of the Simple Expression.