I've configured following route:

interceptSendToEndpoint("*").process(new SendToEndPointHandler());
                                
onException(GenericFileOperationFailedException.class)
        .process(new DeliveryFailureHandler());
                                                                
from("test-jms:queue:notificationtest.queue")
        .process(processor)
        .recipientList(header("recipientListHeader").tokenize(","));


SendToEndPointHandler does following on process method:
String deliveryEndPoint =
exchange.getIn().getHeader(Exchange.INTERCEPTED_ENDPOINT).toString();
Message camel_reply = exchange.getIn();
camel_reply.setHeader("current-endpoint", deliveryEndPoint);
exchange.setOut(camel_reply);


unfortunately on DeliveryFailureHandler I am not seeing the new injected
header...
what am I missing?





Claus Ibsen-2 wrote:
> 
> You can use interceptSendToEndpoint
> http://davsclaus.blogspot.com/2009/05/on-road-to-camel-20-interceptors-round.html
> And see more details at the Camel documentation (link from above)
> 
> 
> And then have it decorate with a custom header what the endpoint is.
> That you can retrieve in your error processor.
> 
> The intercepted endpoint is stored in the IN message header as:
> Exchange.INTERCEPTED_ENDPOINT
> 

-- 
View this message in context: 
http://old.nabble.com/Error-handling-with-recipientList-tp26196454p26199328.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to