camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: File component/language: preMove only
Date Tue, 05 Mar 2013 17:19:02 GMT
On Tue, Mar 5, 2013 at 11:16 AM, vss123 <> wrote:
> Hi,
> We also tried using preMove to avoid multiple instances of Camel picking the
> same file. But that does not seem to work. When we run with more than one
> instance, We get following error.
> cannot begin processing file: GenericFile[sample1.xml] due to: Cannot rename
> file: GenericFile[sample1.xml] to: GenericFile[inProcess/sample1.xml].
> Caused by:
> [org.apache.camel.component.file.GenericFileOperationFailedException -
> Cannot rename file: GenericFile[sample1.xml] to:
> GenericFile[inProcess/sample1.xml]]
> The route we have is.
> from("file://files/inbox/?preMove=inprogress").log("processing
> ${file:name}").to("file://files/outbox?fileName=${file:name}+${exchangeId}")
> Are we missing anything obvious in using Camel this way?

And the other Camel is picking up that file. Eg it get processed?
So the failed to rename is a race condition because the other Camel
grabbed the same file, but was faster to do the rename?

And as usual people should mention which Camel version you use. As we
have many releases, and its important to know what version you use.

> Thanks.
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

Claus Ibsen
Red Hat, Inc.
FuseSource is now part of Red Hat
Twitter: davsclaus
Author of Camel in Action:

View raw message