The recipientList is more complicate then you thought. It is leverage the 
multicast to send the exchange to the other endpoints. As the Exception is 
thrown before the camel have a chance to send the message to the fack endpoint 
that you created. The RedeliveryErrorHandler just set the FAILURE_ENDPOINT to 
the last to endpoint.
I suggest you try to access the exception from the aggregation which is 
configured to the recipientList to find the real reason of the exception.


--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
(English)
          http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Tuesday, December 11, 2012 at 6:11 AM, lleclerc wrote:

> Hi,
>  
> How can I remove invalid endpoints from a recipientList ?
> If I use the route from(direct).doTry().recipientList(..).doCatch().....
>  
> Using the line exchange.getProperty(Exchange.FAILURE_ENDPOINT,
> String.class);
> will return me the 'direct' uri and not the failure recipient.
> Like shown in this screenshot : http://postimage.org/image/d9azbpyfj/full/
>  
> The value "myURI" is the URI of the fakeEndpoint but it's hided in a
> specific Exception, I don't want to manage every exception, only remove the
> invalid endpoints.
>  
> I created a unit test there :
> http://pastebin.com/fYTpU4BU
>  
> Using camel 2.10.2
>  
> Thanks for any hints!
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Removing-invalid-endpoints-from-recipientList-tp5723863.html
> Sent from the Camel - Users mailing list archive at Nabble.com 
> (http://Nabble.com).



Reply via email to