You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Prithiv <sa...@ericsson.com> on 2014/03/07 18:05:38 UTC

Urgent - Reprocess/Consume the same file again - Camel Route

Hi,
Following is a scenario, Please suggest. 
I have a file say A.txt in input folder.
The camel route kicks in, puts in the location of file(filepath/filename) in
a message queue and subsequent process picks up the file, processes it and
the last process moves it to a DONE directory.
Now the requirement is to reprocess the same file A.txt again
(filesize,timestamp,etc being the same) if it is placed in the input folder.
Idempotent = false doesn't work in my scenario, because i see multiple
messages in queue getting created during the route flow.
Is there a way or substitute for alwaysConsume ? or Setting the LRUCacheSize
to 1 ?

Thanks in advance & Appreciate your help





--
View this message in context: http://camel.465427.n5.nabble.com/Urgent-Reprocess-Consume-the-same-file-again-Camel-Route-tp5748468.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Urgent - Reprocess/Consume the same file again - Camel Route

Posted by Claus Ibsen <cl...@gmail.com>.
You can use a custom idempotent repo and then remove the key when you
want to re-prorcess the file again. Such as when you have moved it to
the DONE directory.

Or you can use a custom filter, and then return false, while you are
still processing the file, eg it has not been moved to DONE folder.

On Fri, Mar 7, 2014 at 6:05 PM, Prithiv
<sa...@ericsson.com> wrote:
> Hi,
> Following is a scenario, Please suggest.
> I have a file say A.txt in input folder.
> The camel route kicks in, puts in the location of file(filepath/filename) in
> a message queue and subsequent process picks up the file, processes it and
> the last process moves it to a DONE directory.
> Now the requirement is to reprocess the same file A.txt again
> (filesize,timestamp,etc being the same) if it is placed in the input folder.
> Idempotent = false doesn't work in my scenario, because i see multiple
> messages in queue getting created during the route flow.
> Is there a way or substitute for alwaysConsume ? or Setting the LRUCacheSize
> to 1 ?
>
> Thanks in advance & Appreciate your help
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Urgent-Reprocess-Consume-the-same-file-again-Camel-Route-tp5748468.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Make your Camel applications look hawt, try: http://hawt.io

Re: Urgent - Reprocess/Consume the same file again - Camel Route

Posted by spanchag <si...@ericsson.com>.
Hi,
I'm having the same problem.  Looks like Camel caches 1000 file names.  I'm
also waiting for a solution/workaround for this.

Thanks,
Ram



--
View this message in context: http://camel.465427.n5.nabble.com/Urgent-Reprocess-Consume-the-same-file-again-Camel-Route-tp5748468p5748469.html
Sent from the Camel - Users mailing list archive at Nabble.com.