On Wed, Nov 4, 2009 at 5:12 PM, mcrive <mcr...@optasportsdata.com> wrote: > > 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);
Remove this one line below as you do not want to change the exchange pattern. All you wanted to do was to add that 1 extra header on the IN message. > 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. > > -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus