camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
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
<html>
<head>
    <base href="http://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=CAMEL&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background-color: white" bgcolor="white">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="http://cwiki.apache.org/confluence/display/CAMEL/How+do+I+handle+failures+when+consumimg+for+example+from+a+FTP+server">How
do I handle failures when consumimg for example from a FTP server</a></h2>
    <h4>Page  <b>added</b> by             <a href="http://cwiki.apache.org/confluence/display/~davsclaus">Claus
Ibsen</a>
    </h4>
         <br/>
    <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">//foo@somesever.com?password=secret"</span>).to(<span
class="code-quote">"bean:logic?method=doSomething"</span>);</span>
</pre>
</div></div>

<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
Consumer</a></li>
</ul>

    </div>
    <div id="commentsSection" class="wiki-content pageSection">
       <div style="float: right;">
            <a href="http://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
       </div>
       <a href="http://cwiki.apache.org/confluence/display/CAMEL/How+do+I+handle+failures+when+consumimg+for+example+from+a+FTP+server">View
Online</a>
              |
       <a href="http://cwiki.apache.org/confluence/display/CAMEL/How+do+I+handle+failures+when+consumimg+for+example+from+a+FTP+server?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
           </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message