Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 70E7D200C80 for ; Thu, 25 May 2017 17:04:21 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 6F758160BCA; Thu, 25 May 2017 15:04:21 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B6532160BC7 for ; Thu, 25 May 2017 17:04:20 +0200 (CEST) Received: (qmail 31343 invoked by uid 500); 25 May 2017 15:04:19 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 31326 invoked by uid 99); 25 May 2017 15:04:18 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 May 2017 15:04:18 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 81D31CFAC6 for ; Thu, 25 May 2017 15:04:18 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.286 X-Spam-Level: ** X-Spam-Status: No, score=2.286 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_NONE=-0.0001, SPF_SOFTFAIL=0.972, URIBL_BLOCKED=0.001, URI_HEX=1.313] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id R9CDMoeb8XAr for ; Thu, 25 May 2017 15:04:17 +0000 (UTC) Received: from mwork.nabble.com (mwork.nabble.com [162.253.133.43]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 7CE3B5FCCD for ; Thu, 25 May 2017 15:04:17 +0000 (UTC) Received: from static.162.255.23.22.macminivault.com (unknown [162.255.23.22]) by mwork.nabble.com (Postfix) with ESMTP id 7AE38448CE933 for ; Thu, 25 May 2017 08:04:16 -0700 (MST) Date: Thu, 25 May 2017 08:04:16 -0700 (MST) From: stalbot To: users@camel.apache.org Message-ID: <1495724656502-5800698.post@n5.nabble.com> Subject: Need to be able to change endpoint for recipientList when call is redelivered MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit archived-at: Thu, 25 May 2017 15:04:21 -0000 I have a route with a recipientList. The endpoint passed to the recipientList comes from a property. There is a route-specific onException handler with redelivery for this route. It is possible that the endpoint can be invalid, causing the recipientList to fail and onException redelivery to be triggered. Since the endpoint is invalid, we don't want the redelivery to use the same endpoint and fail again. I have tried to change the property value in the onRedelivery processor when control flow gets there, but it appears that the changed property value passed to the recipientList isn't used on the redelivery attempt. It uses the original value passed in, which causes the route to fail again and go to my fail endpoint. When I check the property value in the fail endpoint (expecting that the endpoint property was not changed), it appears to be the changed endpoint, not the original endpoint. So it seems like the property is changed but redelivery doesn't use it. Is there a way to change the property value prior to its use in the recipientList redelivery attempt such that it will be used instead of using the original value? NOTE: I am using this approach to redeliveries: http://camel.apache.org/how-do-i-retry-processing-a-message-from-a-certain-point-back-or-an-entire-route.html Example code below: from("direct:showList) .onException(HttpOperationFailedException.class) .handled(true) .maximumRedeliveries(MAX_REDELIVERIES) .redeliveryDelay(REDELIVERY_DELAY) .onRedelivery(e->{ e.setProperty(GET_LIST_ENDPOINT, "http4://correctedEndpoint"); }) .to(Endpoint.HANDLE_ERROR_ON_REDELIVERY) .end() .... .to("direct:callGetList") .... .end() from("direct:callGetList") .errorHandler(noErrorHandler()) .recipientList(exchangeProperty(GET_LIST_ENDPOINT)) .end(); -- View this message in context: http://camel.465427.n5.nabble.com/Need-to-be-able-to-change-endpoint-for-recipientList-when-call-is-redelivered-tp5800698.html Sent from the Camel - Users mailing list archive at Nabble.com.