camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob Jolliffe <bobjolli...@gmail.com>
Subject Re: http endpoint, unknown host and errorhandler
Date Wed, 18 Apr 2012 13:00:52 GMT
OK.  I had http endpoint as input to my route which I think caused it
to poll indefinitely.

Using a timer makes it more sane.

<from uri="timer:test?period=20000"/>
   <to
       uri="http://apps.dhis2.org/dev/api/metaData.xml?httpClient.authenticationPreemptive=true&amp;authMethod=Basic&amp;authUsername=admin&amp;authPassword=district"/>


On 18 April 2012 13:34, Bob Jolliffe <bobjolliffe@gmail.com> wrote:
> I have a route which gets data using an http endpoint.  I am trying to
> sensibly handle errors on the route.  Because its a remote server
> there are many things which could go wrong in the network, so I
> configured an errorhandler with maximumRedeliveries="5".
>
> My problem is that if I test with a dummy url of a host which doesn't
> exist, I get the following consumer polling error which continues
> indefinitely.
>
> * WARN  2012-04-18 13:31:22,022 Consumer
> Consumer[http://pps.dhis2.org/dev/api/metaData.xml?authMethod=Basic&authPassword=******&authUsername=admin&httpClient.authenticationPreemptive=true]
> could not poll endpoint:
> Endpoint[http://pps.dhis2.org/dev/api/metaData.xml?authMethod=Basic&authPassword=******&authUsername=admin&httpClient.authenticationPreemptive=true]
> caused by: java.net.UnknownHostException: pps.dhis2.org
> (DefaultPollingConsumerPollStrategy.java [Camel (camel-builtin) thread
> #1 - http://pps.dhis2.org/dev/api/metaData.xml])
>
> This is not being percolated up to my errorhandler.  Am I doing
> something wrong?  Do I have to use doTry instead?
>
> Bob

Mime
View raw message