camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: catch error in producer endpoint
Date Mon, 12 Oct 2009 11:25:50 GMT
On Mon, Oct 12, 2009 at 1:15 PM, parasmk <parasmk@gmail.com> wrote:
>
>
>
> Claus Ibsen-2 wrote:
>>
>>
>> The pollStrategy lets you handle the error at this current polling. By
>> default the ftp consumer will poll every second. You can change this
>> interval by setting a delay on the FTP endpoint, to ex ?delay=60000 to
>> poll once every 60th seconds. The delay is in millis.
>>
>> If you want to stop the ftp consumer totally you need to stop the route
>> instead.
>>
>>
>
> Agreed, that the PollStrategy is for a particular polling cycle. But when I
> say 'false' it should stop that poll and proceed to next endpoint in the
> route, isn't it? For instance, in following route def:
>
> from("ftp://some@localhost?pollStrategy=#myStrategy").process(new
> MyAuditProcessor()).to("file://target/ftp").stop();
>
> If I get an exception in FTP producer (server down), the control goes to
> myStrategy.rollback(), and when I return false it just keeps polling and
> does not proceed to .process().  Is this expected?  If I do a
> consumer.stop() it stops the entire route, which I do not want.
>

You cannot continue to the next process as there are NO data. You are
trying to get some data from the remote FTP server but you cannot get
data.
Its like trying to route from a JMS queue in which you cannot connect to.

And btw what do you want to happen in MyAuditProcessor if there is NO data?



> Thanks again for your continued help!
>
> --
> View this message in context: http://www.nabble.com/catch-error-in-producer-endpoint-tp25748604p25854055.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Mime
View raw message