On Fri, Dec 16, 2011 at 8:50 AM, Guillaume Yziquel <[email protected]> wrote: > Le Friday 16 Dec 2011 à 09:50:31 (+0800), Willem Jiang a écrit : >> You can shutdown the route in the error handler. I don't think >> shutdown the endpoint is good practices, as it will cause some >> trouble when the message is routed to that endpoint. > > Thanks. So shutting down the endpoint does not seem good practice. > > What about initialisation of the endpoint? Should we fail to create it > if the underlying communication channel is unavailable? >
Its component specific. There is no rule enforced by Camel. Some components can self heal and recover (eg JMS with re-connect and failover). Others cannot etc. Some components allow end users to specify if they want to lazy connect to remote system eg upon demand. Others have options to check for valid connection upon start. If an endpoint cannot work upon starting, then throw an exception from the doStart method. This will signal to Camel that starting a route that uses this endpoint, does not work. However if your endpoint can recover itself, then you may not want to throw an exception in doStart, but re-connect / self heal from within the endpoint. > -- > Guillaume Yziquel > Software Developer > > Crossing-Tech > Parc Scientifique EPFL -- Claus Ibsen ----------------- FuseSource Email: [email protected] Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
