You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by praveenbillampati <pr...@gmail.com> on 2012/02/25 11:47:22 UTC

delete=true is not working in combination with doneFileName as a marker

Hi,

I am working on camel 2.8. My requirement is to write a file to an 'inbox'
folder where camel is listening continuously and once the camel consumes the
file i need to delete the file from that 'inbox' folder. I use 'delete=true'
for this purpose.

To avoid file being consumed during write of file i tried readLock options,
but none of the readLock options serves my purpose. So I try with
'doneFileName' which is working well, but i see in all these cases (using
readLock options, doneFileName) a default backup of file is happening in
.camel/ folder even though i use delete=true.

Here is the route i am using

<route>
<from uri="file://test/inbox?delete=true;&amp;doneFileName=done" />
<to uri="bean:processer?method=processMessage" />
</route>

Does delete=true fail in combination with other options? I need a solution
to avoid backup in '.camel/ ; folder and also i don't want any backup.

I hope there can be a working solution for this delete=true in combination
with 'doneFileName'. Any help is much appreciated. Thanks in advance.

OS: LINUX
Camel : 2.8
JRE : 1.6

--Praveen.

--
View this message in context: http://camel.465427.n5.nabble.com/delete-true-is-not-working-in-combination-with-doneFileName-as-a-marker-tp5514926p5514926.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: delete=true is not working in combination with doneFileName as a marker

Posted by praveenbillampati <pr...@gmail.com>.
Thanks Claus,

It works. Yes, it should be '&amp;' not ';&amp;'.


--Praveen

--
View this message in context: http://camel.465427.n5.nabble.com/delete-true-is-not-working-in-combination-with-doneFileName-as-a-marker-tp5514926p5515298.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: delete=true is not working in combination with doneFileName as a marker

Posted by Claus Ibsen <cl...@gmail.com>.
On Sat, Feb 25, 2012 at 11:47 AM, praveenbillampati
<pr...@gmail.com> wrote:
> Hi,
>
> I am working on camel 2.8. My requirement is to write a file to an 'inbox'
> folder where camel is listening continuously and once the camel consumes the
> file i need to delete the file from that 'inbox' folder. I use 'delete=true'
> for this purpose.
>
> To avoid file being consumed during write of file i tried readLock options,
> but none of the readLock options serves my purpose. So I try with
> 'doneFileName' which is working well, but i see in all these cases (using
> readLock options, doneFileName) a default backup of file is happening in
> .camel/ folder even though i use delete=true.
>
> Here is the route i am using
>
> <route>
> <from uri="file://test/inbox?delete=true;&amp;doneFileName=done" />
> <to uri="bean:processer?method=processMessage" />
> </route>
>

Looks like you have misconfigured the XML - you have a semi colon in
front of the &amp.
It should just be &amp;


> Does delete=true fail in combination with other options? I need a solution
> to avoid backup in '.camel/ ; folder and also i don't want any backup.
>

Works fine with Camel. I added unit test that cannot reproduce your
issue. The file is deleted.
http://svn.apache.org/viewvc?rev=1293578&view=rev

> I hope there can be a working solution for this delete=true in combination
> with 'doneFileName'. Any help is much appreciated. Thanks in advance.
>
> OS: LINUX
> Camel : 2.8
> JRE : 1.6
>
> --Praveen.
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/delete-true-is-not-working-in-combination-with-doneFileName-as-a-marker-tp5514926p5514926.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/