I think you customer endpoint consumer should take care of database reconnect issue. Because even you customer endpoint consumer can change the route state, you have to restart the route somewhere.

Maybe you customer endpoint consumer should extends the PollingConsumerSupport, then camel route can do some thing when the database connection is broken.


On 8/4/11 9:06 PM, ravi wrote:
I have one route defined like:

from (MyCustomEndPoint).to(activeMQ:myQ)

MyCustomEndPoint is a custom endpoint which returns a Consumer, The consumer
has got one internal Thread reading messages from Database. If lets say some
Database Exception comes(connection reset) the internal thread stops but
consumer is still alive (Camel Route remain in Started State, so next time
when Database connection is online, as Read Thread is stopped it is not
reading from Database because there is no check of whether Read Thread is
running or not).

For such scenario i want MyCustomEndpoint to get re-initialized. Or i may go
with Route Re-start but if there is way and Camel Framework allows it.






--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Route-Recovery-in-case-of-FATAL-Exception-tp4666264p4666264.html
Sent from the Camel - Users mailing list archive at Nabble.com.



--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
         http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang

Reply via email to