Hi Claus,

I am using camel-hdfs.

I added this to my route : onException( RuntimeCamelException.class 
).markRollbackOnly().handled( true ).stop();

Now my process does not die but the file is deleted from the source anyhow.

Thanks!

Chirag



________________________________
 From: Claus Ibsen <[email protected]>
To: "[email protected]" <[email protected]> 
Sent: Monday, 1 September 2014 10:57 AM
Subject: Re: Uncaught CamelRuntimeException in HDFS
 

Hi

During Camel routing an unhandled exception will mean the exchange is
failed, and the file is not deleted.
Since you use storm then I guess it has an influence somehow.

Can you reproduce the issue without storm?

And how do you store in hdfs, do you use camel-hdfs or something else?



On Sun, Aug 31, 2014 at 10:25 AM, Chirag Dewan <[email protected]> wrote:
>
>
> Hi All,
>
>
>
> I have a route which polls the files from FTP server and stores them in HDFS. 
> Now when I shut down my datanodes in HDFS and try to poll a file,I get an 
> uncaught RuntimeException and my process dies(storm worker).
>
> Is there any way I can catch the CamelRuntimeException,maybe log the 
> exception and make sure that the file on FTP server is not deleted(route 
> completion is not invoked).
>
> I think I can catch the exception by onException(CamelRuntimeException) in my 
> route. But what should I do afterwards that the worker doesnt die?
>
> Thanks!
>
> Chirag



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: [email protected]
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Reply via email to