Hi

Could be a missing feature of the file component. Maybe there should be an
option such as deleteOnFailure=true.

Some people would like the file to be deleted, others would like it to be
untouched etc, so there should be a parameter option to set the behaviour.

If the feature is missing, please file a JIRA so its not forgotten.



dvd wrote:
> 
> Hi,
> 
> I have defined following route:
> 
> exception(ValidationException.class).to("file:target/messages/invalid");
> from("file:src/data?delete=true").convertBodyTo(String.class).
>     to("validator:schema/person.xsd").
>     to("file:target/messages/valid");
> 
> The validator throws an exception when an invalid message is polled from
> the specified directory. It is routed correctly to the invalid target
> directory, and the original message remains in the polling directory and
> is locked.
> How can I change this behavior so that the invalid file also is deleted
> from the polling directory, just like the valid messages ?
> 
> Any thoughts on this ?
> 
> Thanks.
> Dirk
> 

-- 
View this message in context: 
http://www.nabble.com/File-Component-Error-handling-tp15372041s22882p16046544.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to