Can you do property substitution within the file URL? What I am trying to do is make the source and move directories properties?
Example:
<from uri="file:${in.directory}?move=${archive.directory}/${date:now:yyyyMMdd}/${file:name.noext}.txt&consumer.delay=1000&readLock=rename&readLockTimeout=1000&maxMessagesPerPoll=100"/>
Error Results:
Caused by: java.lang.IllegalArgumentException: Invalid directory: ${in.directory}. Dynamic expressions with ${ } placeholders is not allowed. Use the fileName option to set the dynamic expression.
"Use the fileName option to set the dynamic expression." - what does this mean?
I tried make the file component into an endpoint http://camel.apache.org/how-do-i-use-spring-property-placeholder-with-camel-xml.html then I had trouble with the $ and $.
Thanks in advance,
Peter.
You need to use the properties function to do so.
move=${properties:archive.directory}