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 41E4962AE for ; Thu, 9 Jun 2011 09:49:00 +0000 (UTC) Received: (qmail 76721 invoked by uid 500); 9 Jun 2011 09:48:59 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 76697 invoked by uid 500); 9 Jun 2011 09:48:59 -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 76689 invoked by uid 99); 9 Jun 2011 09:48:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Jun 2011 09:48:59 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of marco.zapletal@gmail.com designates 209.85.161.45 as permitted sender) Received: from [209.85.161.45] (HELO mail-fx0-f45.google.com) (209.85.161.45) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Jun 2011 09:48:51 +0000 Received: by fxm2 with SMTP id 2so1071441fxm.32 for ; Thu, 09 Jun 2011 02:48:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=0/kV+D3lgHItmfZ4RVckEOpxNlYBm/0xSEOC7RSjgJo=; b=qDeRDwAYw8TmRGSxNtILRUv5PETqDBwQ4QjCtXUDb3K80sAZFuw3EUTgUg4cUrHkTA pbl1E0M+FVoZumGAETlq0VCm5D6wG709CxW1uclDR1iloaMtQHP0UBz242iaib1VJVQ0 VZPeU2zNRzdwFRRLOKU4fQPmU8QnTBbDZ/A2M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; b=c5Qm7S3g3s5wiiW0RHBStjMJfWEaavamuu7t0CTuhLxWM4zkv2nAVAKu4EZDtYCPjf e0kWuFslrbQ58+CxKT0u42IPeh4eo9Or1vFZuyy+yilIfFM8tPso/Dn9gTy3RH6jC/zQ lORD5PJrz5XAwHdgL4QCFO4kVrmfA/aY2jBDA= Received: by 10.223.161.194 with SMTP id s2mr525172fax.143.1307612911280; Thu, 09 Jun 2011 02:48:31 -0700 (PDT) Received: from [192.168.168.136] (fortinat.ifs.tuwien.ac.at [128.131.167.8]) by mx.google.com with ESMTPS id g7sm571641fac.39.2011.06.09.02.48.28 (version=SSLv3 cipher=OTHER); Thu, 09 Jun 2011 02:48:30 -0700 (PDT) Sender: Marco Zapletal Message-ID: <4DF096DB.40206@gmail.com> Date: Thu, 09 Jun 2011 11:48:11 +0200 From: Marco Zapletal User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: users@camel.apache.org Subject: Re: Using properties or headers to persist meta information on the exchange? References: <4DEFA20B.8000300@gmail.com> <4DEFA2C3.2030501@catify.com> <4DEFA500.2010500@gmail.com> <4DEFB85F.8060109@gmail.com> <4DF04BDC.2070602@catify.com> In-Reply-To: <4DF04BDC.2070602@catify.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Claus, thanks for your response. yes, it is quite obvious that in such cases, the headers will be lost (which would be the case for properties, too). I was just a little bit confused about the distinction between headers and properties, after reading the thread I cited [1]. Anyway, I will stick to headers, which seem to work fine for me. regards, marco On 09.06.2011 06:28, Claus Straube wrote: > Marco, I think it depends on what you want to do. Of course there're > components where you will loose message headers. Look at the file > component, hazelcast:map or a database component. Of course you'll loose > here the message headers, because they're bound to camel (where should > you store them if put a file on disk? ...or an object into data grid?). > If you need these information in your business context you have to > implement this. > > On 08.06.2011 19:58, Marco Zapletal wrote: >> Yes, I've read that. Actually, I just wanted to keep my (String) >> properties when the exchange goes through the JMS queue (similar like >> headers are kept over JMS queues). >> >> If it is the intended behavior that exchange properties are stripped >> away by the JMS component, I am fine with using headers instead. >> However, this contradicts then in my opinion to the discussion in [1], >> where it is mentioned that exchange properties should be used for >> durable storing (serializable) meta information on the exchange. >> >> -- >> The problem with the non-serializable MessageInfo (which violates the >> JMS spec) occurs only if I set the transferExchange property on the >> JMS component to true (which I tried only as a workaround). >> >> regards, >> marco >> >> [1] >> http://camel.465427.n5.nabble.com/How-long-do-the-camel-headers-live-in-routes-td474477.html >> >> >> >> On 08.06.2011 19:41, Claus Ibsen wrote: >>> The JMS spec limits what can be send as JMS headers. Read more details >>> on the Camel JMS wiki page. And for example in the JMS java doc. >>> >>> >>> On Wed, Jun 8, 2011 at 6:36 PM, Marco >>> Zapletal wrote: >>>> Hi, >>>> >>>> thanks for the quick response. Yes, I've tried this, but this opens up >>>> another problem if you use a CXF endpoint on your route. The CXF >>>> endpoint >>>> seems to store an instance of >>>> org.apache.cxf.service.model.MessageInfo on >>>> the exchange, which is not serializable. This results in a runtime >>>> exception, which cancels the execution of the process instance. >>>> >>>> regards, >>>> marco >>>> >>>> >>>> On 08.06.2011 18:26, Claus Straube wrote: >>>>> >>>>> Hi Marco, >>>>> >>>>> have you tried 'transferExchange=true' inside your JMS route? That >>>>> could >>>>> be a solution for your JMS problem. >>>>> >>>>> Best regards - Claus >>>>> >>>>> On 08.06.2011 18:23, Marco Zapletal wrote: >>>>>> >>>>>> Hi, >>>>>> >>>>>> I learned from this thread >>>>>> >>>>>> (http://camel.465427.n5.nabble.com/How-long-do-the-camel-headers-live-in-routes-td474477.html) >>>>>> >>>>>> that one should use properties instead of headers in order to durable >>>>>> store meta information on an exchange (acc. to one of the postings, >>>>>> headers can get lost at endpoints). >>>>>> >>>>>> I would like to know whether this in principle correct. If so, I ran >>>>>> into the problem that properties seem to stripped away if an exchange >>>>>> goes through a JMS queue. Could anyone tell me what's the recommended >>>>>> approach to keep meta information durable on the exchange. >>>>>> >>>>>> thanks, >>>>>> marco >>>>>> >>>>> >>>> >>>> >>> >>> >>> >> >> >> > >