Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 437E81798D for ; Tue, 11 Nov 2014 18:24:37 +0000 (UTC) Received: (qmail 59400 invoked by uid 500); 11 Nov 2014 18:24:36 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 59348 invoked by uid 500); 11 Nov 2014 18:24:36 -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 59326 invoked by uid 99); 11 Nov 2014 18:24:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Nov 2014 18:24:36 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of terris@gmail.com designates 209.85.160.182 as permitted sender) Received: from [209.85.160.182] (HELO mail-yk0-f182.google.com) (209.85.160.182) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Nov 2014 18:24:32 +0000 Received: by mail-yk0-f182.google.com with SMTP id q9so277679ykb.13 for ; Tue, 11 Nov 2014 10:24:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=1jZxVbJhHC8Z6WHM8XtvgmwDME1NOa4DzfP6xpl4iXw=; b=wqOGmixkllgCwaNWLlogT1CzHSqQljXPhZrOHPMDIxtLrGUUDTl0C1VHgXNZPqClKC sW0ssdXTlpHag2I4Z8QgK6bwsMBYfO0gzp8q4xM8PNf9nrvRLo6f1+FJCFIPjo/9uQJh w7SDgptpivLT8xiTJvn61V0Mtb+ljhd0e8+KiLi+ijHQF0y71ZJBhcfaKB7FzhK29SSe 3zwtBVxyjSy+EUB0x1Kr4fRuUQQ43TSHiHBkQgzVAN5oV23+rmM1cHi6gmhUFGbXfICI UNE8fhFj1SQC4mOVm5/AdWil9D9Xneb1CjDSL5CNSw5W26DqxmgznpS4tV6ibSMIkr8x 4+bA== X-Received: by 10.170.171.214 with SMTP id n205mr2528885ykd.125.1415730251324; Tue, 11 Nov 2014 10:24:11 -0800 (PST) MIME-Version: 1.0 Sender: terris@gmail.com Received: by 10.170.131.195 with HTTP; Tue, 11 Nov 2014 10:23:31 -0800 (PST) In-Reply-To: References: From: Camel Guy Date: Tue, 11 Nov 2014 10:23:31 -0800 X-Google-Sender-Auth: iOHXFgz7rawlOh2hB_AVrGigQUs Message-ID: Subject: Re: Best way to discard changes made to Exchange by invoked route To: "users@camel.apache.org" Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org Hi Claus, Indeed, after running a test program, I confirmed that enrich and recipientList 'hide' changes made to properties but not to headers. This is not the case, however, for dynamicRouter, which doesn't hide changes made to headers or properties. split works for headers in addition to properties -- I imagine that seda does as well. Is enrich more efficient than split? Wondering if it's worth changing the code to use properties. Thanks! cg On Tue, Nov 11, 2014 at 9:30 AM, Claus Ibsen wrote: > You can store information as exchange properties and they stick around > > On Tue, Nov 11, 2014 at 6:00 PM, Camel Guy wrote: >> Hi Claus, >> >> Thank you again for your reply. Unfortunately I did not see anything >> in that FAQ that relates to my problem. >> >> From route A, I am invoking route B (serially) that deletes a header >> key. I would like the header key to exist for route A afterwards even >> though route B deleted it. Using a splitter works great. I can not get >> enrich or recipientList to work. >> >> This is a contrived example. The general use case is invoking routes >> without side-effects so they can be called recursively -- as >> subroutines. >> >> >> Thanks, >> >> cg >> >> On Tue, Nov 11, 2014 at 12:00 AM, Claus Ibsen wrote: >>> See this FAQ >>> http://camel.apache.org/why-is-my-message-body-empty.html >>> >>> On Tue, Nov 11, 2014 at 8:22 AM, Camel Guy wrote: >>>> Hi Claus, >>>> >>>> Thanks for the pointer! >>>> >>>> This program logs "INFO hello" followed by an empty INFO message. I >>>> would like the second logged message to also be "INFO hello." >>>> >>>> Am I doing something wrong? >>>> >>>> Camel 2.14.0 >>>> >>>> >>>> Thank you, >>>> ~cg >>>> >>>> >>>> >>>> hello >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> On Mon, Nov 10, 2014 at 10:06 PM, Claus Ibsen wrote: >>>>> See about the content enricher >>>>> >>>>> On Tue, Nov 11, 2014 at 4:21 AM, Camel Guy wrote: >>>>>> Hello, >>>>>> >>>>>> I am using Spring XML. I would like to invoke a route synchronously, >>>>>> passing the current Exchange. However, I want to discard the changes >>>>>> that the invoked route makes to the Exchange (e.g., modification of >>>>>> headers). >>>>>> >>>>>> So far this is the shortest recipe that results in the desired behavior: >>>>>> >>>>>> 1 >>>>>> >>>>>> Is there a more elegant way to do this? >>>>>> >>>>>> I tried direct:Foo >>>>>> but the current Exchange was modified. >>>>>> >>>>>> >>>>>> Thanks, >>>>>> ~cg >>>>> >>> >>> >>> >>> -- >>> Claus Ibsen >>> ----------------- >>> Red Hat, Inc. >>> Email: cibsen@redhat.com >>> Twitter: davsclaus >>> Blog: http://davsclaus.com >>> Author of Camel in Action: http://www.manning.com/ibsen >>> hawtio: http://hawt.io/ >>> fabric8: http://fabric8.io/ > > > > -- > Claus Ibsen > ----------------- > Red Hat, Inc. > Email: cibsen@redhat.com > Twitter: davsclaus > Blog: http://davsclaus.com > Author of Camel in Action: http://www.manning.com/ibsen > hawtio: http://hawt.io/ > fabric8: http://fabric8.io/