You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Pil <ca...@pilgrim.dnsalias.com> on 2013/04/09 17:17:30 UTC

Endpoint lifecycle and irrecoverable errors

Hello.

I tried to find some information / examples about lifecycle of endpoints,
but haven’t found anything usable for me (or I didn’t understand something).
So I try to ask my question here.

I have a custom endpoint (self written), that has to manage connection to a
legacy application. I use a thread inside of the endpoint to manage this
connection. This works like a charm now. I can send the message to my
endpoint. I do not need a consumer for the endpoint. 

My problem is that it should be possible to shutdown the route if the
connection breaks. This has to be irrecoverable error. What is the best way
to shutdown a route from the endpoint? In the thread  Endpoint lifecycle and
irrecoverable errors
<http://camel.465427.n5.nabble.com/Endpoint-lifecycle-and-irrecoverable-errors-td5077522.html>  
Claus Ibsen answered, that an error could be caught in an error handler. But
the error handler for a route will be used only if a message could not be
sent. (Is it correct?) It is too late for me. The route should shutdown
without exchange at all. Can you tell me where can I find an example for a
similar problem?

For sure I can implement a class that gets information from my endpoints and
shutdowns the route but is it “camel way?” Are there other possibilities?

Thank you in advance
Pil




--
View this message in context: http://camel.465427.n5.nabble.com/Endpoint-lifecycle-and-irrecoverable-errors-tp5730595.html
Sent from the Camel - Users mailing list archive at Nabble.com.