You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by blacar <bc...@gmail.com> on 2014/05/12 13:02:24 UTC

FTP endpoint on error

Hi guys,

I hope you can help me. 

I want to create a route that read files from a FTP and publish some data to
different webservices ... that i know how to do it, however i want to place
on a different folder those files that has caused problems (received a
400/500, raised an exception, and so on) and i am not sure how to do it.

can you help me to figure out how to build a route like this?

Thanks in advance,



--
View this message in context: http://camel.465427.n5.nabble.com/FTP-endpoint-on-error-tp5751021.html
Sent from the Camel - Users mailing list archive at Nabble.com.

RE: FTP endpoint on error

Posted by blacar <bc...@gmail.com>.
Hi Ravi,

Thanks for reply.

At the moment i think i have it solved.

onException(Exception.class).id("movexToServiceRouteOnException").log(ERROR,  
                        
"${exception.stacktrace}").handled(true).to(getDiscardFtpEndPoint());

I declared a onException route that logs the stack trace, handle the
exception, and routes the file to a new endpoint, that is and FTP endpoint
configured to work on the "discard" folder.

do you see any problem with this approach? ... im interested in learn how to
do it in the better way.

Thanks,



--
View this message in context: http://camel.465427.n5.nabble.com/FTP-endpoint-on-error-tp5751021p5751112.html
Sent from the Camel - Users mailing list archive at Nabble.com.

RE: FTP endpoint on error

Posted by Ra...@cognizant.com.
Can you share the route specifics you currently have ?

-Ravi
________________________________________
From: blacar [bcrafa@gmail.com]
Sent: Monday, May 12, 2014 4:32 PM
To: users@camel.apache.org
Subject: FTP endpoint on error

Hi guys,

I hope you can help me.

I want to create a route that read files from a FTP and publish some data to
different webservices ... that i know how to do it, however i want to place
on a different folder those files that has caused problems (received a
400/500, raised an exception, and so on) and i am not sure how to do it.

can you help me to figure out how to build a route like this?

Thanks in advance,



--
View this message in context: http://camel.465427.n5.nabble.com/FTP-endpoint-on-error-tp5751021.html
Sent from the Camel - Users mailing list archive at Nabble.com.
This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful.