On Wed, Mar 20, 2013 at 9:29 AM, mdo <manfred.doh...@gmail.com> wrote: > Claus Ibsen-2 wrote >> The file component has move and moveFailed options where you can >> specify the directories to move the file. > > Sorry, I think I missed to describe a detail. The route should be more like > this: > > 1. from: file:///incoming/?moveFailed=B > 2. somehow filter/process the unmarshalled data for validation > 3. to some destination A, maybe a remote FTP site or a local directory > > A file that failed to validate should be moved into a failed-directory on > the source side. My question is how can I use the original file > content/in-message in my to()? >
You can store it on a property on the exchange and access that at any time from("file:....") .setProperty("OriginalFile", simple("${body"}) // and then you can transform the message to the original message, later when needed .setBody(property("OriginalFile")) Though in the Camel API there is also a method to access the incoming message with http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/spi/UnitOfWork.html#getOriginalInMessage() > Best regards, mdo. > > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Unmarshal-CSV-but-continue-route-with-unaltered-message-tp5729446p5729477.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen