You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by geetha <ha...@gmail.com> on 2014/03/14 11:36:42 UTC

Issue in moving the file after all the processors executed without any exception

Hi,

I am using SFTP and consumerTemplate to fetch the file. Using spring DSL.
Initially my route listen to a queue and gets the encoded message with the
SFTP server details. My first processor decode the message and give me the
path and name of the file inside the server. My second processor forms the
uri based on the details.
Exchange localexchange = consumer.receive(uri) to fetch the file and give it
to another processor for further processing of the file. Now i want to
rename the file as xyz.done only when all the processors executed
successfully. 

As consumer.doneUoW(localexchange) is done inside the second processor
itself, it just renaming the file even before the rest of the processors are
executing. 
Is there any way to postpone the move action after all my processors
successfully executed.




--
View this message in context: http://camel.465427.n5.nabble.com/Issue-in-moving-the-file-after-all-the-processors-executed-without-any-exception-tp5748823.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Issue in moving the file after all the processors executed without any exception

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Can you not call
 consumer.doneUoW(localexchange)

later?



On Fri, Mar 14, 2014 at 11:36 AM, geetha <ha...@gmail.com> wrote:
> Hi,
>
> I am using SFTP and consumerTemplate to fetch the file. Using spring DSL.
> Initially my route listen to a queue and gets the encoded message with the
> SFTP server details. My first processor decode the message and give me the
> path and name of the file inside the server. My second processor forms the
> uri based on the details.
> Exchange localexchange = consumer.receive(uri) to fetch the file and give it
> to another processor for further processing of the file. Now i want to
> rename the file as xyz.done only when all the processors executed
> successfully.
>
> As consumer.doneUoW(localexchange) is done inside the second processor
> itself, it just renaming the file even before the rest of the processors are
> executing.
> Is there any way to postpone the move action after all my processors
> successfully executed.
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Issue-in-moving-the-file-after-all-the-processors-executed-without-any-exception-tp5748823.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