camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sven Bauhan <>
Subject How to catch a DirectConsumerNotAvailableException?
Date Tue, 13 May 2014 18:20:23 GMT

I have a route with a direct endpoint going to a socket connection. It 
can be the the program on the other side of the connection crashes and 
the connection is shut down. My messages in the route cannot be 
delivered any more. This happens especially from the aggregator in the 

In the log file I can see that for each aggregated message a 
DirectConsumerNotAvailableException is thrown. Now I want to catch this 
exception to advise the Aggregator  to report an error to the sender of 
the message instead of a success message.

Do I have to catch the exception on the route or in the aggregator? How 
can I handle it in the Aggregator::onCompletion() method?


View raw message