camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sven Bauhan <>
Subject Re: How to catch a DirectConsumerNotAvailableException?
Date Fri, 16 May 2014 15:52:31 GMT
Now I managed to propagate the message to an inner route and catch it there.

But I don't know how to handle the good case.
If the message is send to the endpoint correctly, I have to reply with 
an acknowledge message.
But how does the inner route know if the message is transmitted 
correctly to the endpoint?

Thanks Sven

On 05/13/14 20:20, Sven Bauhan wrote:
> Hi,
> 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 
> route.
> 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?
> Thanks,
> Sven

View raw message