camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [CONF] Apache Camel > How do I handle failures when consumimg for example from a FTP server
Date Thu, 08 Oct 2009 07:37:00 GMT
    <base href="">
            <link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=CAMEL&amp;forWysiwyg=true"
<body style="background-color: white" bgcolor="white">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="">How
do I handle failures when consumimg for example from a FTP server</a></h2>
    <h4>Page  <b>added</b> by             <a href="">Claus
    <div class="notificationGreySide">
         <h2><a name="HowdoIhandlefailureswhenconsumimgforexamplefromaFTPserver-HowdoIhandlefailureswhenconsumimgforexamplefromaFTPserver"></a>How
do I handle failures when consumimg for example from a FTP server</h2>

<p>When you do a route such as</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
from(<span class="code-quote">"ftp:<span class="code-comment">//"</span>).to(<span

<p>And there is a failure with connecting to the remote FTP server. The existing <a
href="/confluence/display/CAMEL/Error+handling+in+Camel" title="Error handling in Camel">Error
handling in Camel</a> is based on when a message is <b>being</b> routed.<br/>
In this case the error occurs <b>before</b> a message has been initiated and routed.
So how can I control the error handling?</p>

<p>The <a href="/confluence/display/CAMEL/FTP2" title="FTP2">FTP</a> component
have a few options (<tt>maximumReconnectAttempts, reconnectDelay</tt> to control
number of retries and delay in between.</p>

<p>But you can also plugin your own implementation and determine what to do using the
<tt>pollStrategy</tt> option which has more documentation <a href="/confluence/display/CAMEL/Polling+Consumer"
title="Polling Consumer">here</a>.</p>

<p>See also</p>
<ul class="alternate" type="square">
	<li><a href="/confluence/display/CAMEL/FTP2" title="FTP2">FTP</a></li>
	<li><a href="/confluence/display/CAMEL/Polling+Consumer" title="Polling Consumer">Polling

    <div id="commentsSection" class="wiki-content pageSection">
       <div style="float: right;">
            <a href=""
class="grey">Change Notification Preferences</a>
       <a href="">View
       <a href=";showCommentArea=true#addcomment">Add

View raw message