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&authMethod=Basic&authUsername=admin&authPassword=district"/> On 18 April 2012 13:34, Bob Jolliffe <bobjolli...@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