I have a processor with below code
ProducerTemplate.sendBodyAndProperty("direct:endpoint", body, property, propertyValue)
I need to use propertyValue in the below route()
<route>
<from uri="direct:endpoint" />
<to uri="file:/?fileName=${propertyValue}" />
</route>
Please advice
2
Answers
After making below change it worked like charm..thank you @M.Ricciuti
With the producer method
sendBodyAndProperty
you are setting an exchange property : so you can simply use Exchange Property EL in your route definition.Assuming your property key is “targetFileName”, you can write: