camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gilboy <>
Subject Re: Camel Component - Consumer Threading Question
Date Thu, 14 Jun 2012 16:47:19 GMT
Thanks again

1 final question on this. If an exception occurs in the run method of the
consumer, I want the endpoint, producer and consumer to be re-started.

I was thinking of handling this as follows:

class CustomConsumer extends DefaultConsumer implements Runnable{

public void run(){


    } catch (Exception exc){


However, from the documentation it says I need to call
getCamelContext().getInflightRepository().remove(Exchange) before calling
getCamext().stopRoute("routeName"). Unfortunately, in the consumer I do not
have access to the Exchange object, i.e. I can only create a new Exchange
object. Any suggestions?

My custom component is a singleton and its referenced in different routes


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message