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: deadLetterChannel not catching servicemix-http provider connect exception
Date Thu, 29 Jan 2009 05:38:51 GMT
On Thu, Jan 29, 2009 at 6:34 AM, Claus Ibsen <claus.ibsen@gmail.com> wrote:
> On Wed, Jan 28, 2009 at 10:01 PM, bwhite <bwhite@thirdpillar.com> wrote:
>>
>> Hi all,
>>
>> I have set up error handling using camel's dead letter channel in a few
>> camel routes, but there is one particular scenario that is not working as I
>> expect.
>>
>> This route is as follows: JMS consumer -> camel endpoint A -> HTTP Provider.
>>
>> If the target webservice that the HTTP Provider is connecting to is down,
>> one would expect that the connect exception would be caught and handled by
>> the dead letter channel.
>>
>> Instead, I see the exception in the smx console, but dead letter processing
>> does not kick in. However: if I then ctrl-c servicemix, THEN the message
>> does get handled by the dead letter processing. Servicemix also hangs at
>> this point and I am forced to exit the console it's running in. When the
>> target webservice of my HTTP Provider is up and running, there are no
>> problems.
>>
>> Has anybody had this issue before? Ideas? I want to be able to handle the
>> error via dead letter channel immediately after this error occurs. Any help
>> is very much appreciated.
>>
>> Servicemix 3.2.2
>> Camel 1.4
> Yeah its a limitied feature in Camel 1.4 the DLC does not look into
> the exception hierarcy. Its been much improved in Camel 1.6.
> So as a workaround you can catch (Exception) or (RuntimeException) or
> what the top exception is that is thrown from the HTTP service.
Actually you can implement your own ExceptionPolicyStrategy in Camel
1.4 and use the code from Camel 1.6
that is much improved.

See:
http://camel.apache.org/exception-clause.html
section: Using custom ExceptionPolicyStrategy

And then go look for the Camel 1.6 source code:
https://svn.apache.org/repos/asf/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/exceptionpolicy/DefaultExceptionPolicyStrategy.java

And copy that into a class of your own and specify that as the
exception policy to use.


>
>
>
>>
>> Here's the connect exception that gets written to the console when it's not
>> handled by dead letter:
>> DEBUG - HttpComponent                  - Retrieved correlation id: null
>> Exception in thread "HttpClient-1" java.lang.RuntimeException:
>> org.mortbay.jetty.EofException
>>
>> Thanks,
>>
>> Bryan
>>
>> --
>> View this message in context: http://www.nabble.com/deadLetterChannel-not-catching-servicemix-http-provider-connect-exception-tp21714882s22882p21714882.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/
>



-- 
Claus Ibsen
Apache Camel Committer

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

Mime
View raw message