camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: How to handle error when - Renaming file from: *** failed due cannot delete from file
Date Wed, 13 Feb 2013 14:07:12 GMT
On Wed, Feb 13, 2013 at 2:59 PM, briane80 <bellis@ccea.org.uk> wrote:
> Hi Claus,
>
> Sorry there was an error in the text a copied over - I am using the
> deadLetterChannel as follows and get the problem:
>
> errorHandler(deadLetterChannel("file:\\\\C:\\Errors")).maximumRedeliveries(3).redeliveryDelay(5000).retryAttemptedLogLevel(LoggingLevel.WARN).useOriginalMessage());
>
> from("file:\\\\C:\\Messages\\Inbox?consumer.delay=5000&include=.*.gz").unmarshal().gzip().to("file:\\\\C:\\Messages\\Outbox")
>

I think you have hit a file being locked issue on Windows due the gzip
unmarshal may have a file input stream being not closed.

You can convert the message to a String / byte[] before unmarshal to
avoid this problem

from file
  convertBodyTo(byte[].class)
  unmarshal



>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-to-handle-error-when-Renaming-file-from-failed-due-cannot-delete-from-file-tp5727493p5727500.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: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Mime
View raw message