Return-Path: Delivered-To: apmail-activemq-camel-user-archive@locus.apache.org Received: (qmail 33362 invoked from network); 27 Feb 2008 07:17:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Feb 2008 07:17:08 -0000 Received: (qmail 64767 invoked by uid 500); 27 Feb 2008 07:17:03 -0000 Delivered-To: apmail-activemq-camel-user-archive@activemq.apache.org Received: (qmail 64678 invoked by uid 500); 27 Feb 2008 07:17:03 -0000 Mailing-List: contact camel-user-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: camel-user@activemq.apache.org Delivered-To: mailing list camel-user@activemq.apache.org Received: (qmail 64669 invoked by uid 99); 27 Feb 2008 07:17:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Feb 2008 23:17:03 -0800 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of james.strachan@gmail.com designates 216.239.58.190 as permitted sender) Received: from [216.239.58.190] (HELO gv-out-0910.google.com) (216.239.58.190) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Feb 2008 07:16:27 +0000 Received: by gv-out-0910.google.com with SMTP id e6so1065785gvc.5 for ; Tue, 26 Feb 2008 23:16:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=wSqv31Kv5noloOVg/AE25cNzuqol4bASokamABuc8Xk=; b=buRS3Ql32JnS4N2T0rZifp2nWrq0iKQo6C0S8kt6fCmJBjJT+dOtORVNqtL7gOKSdWSXHo8zOU8cghI3C8bc4c2JOj4DtHpCttbuVXApOvDQk9b0c8RBC8MZysGV/hgVBjW7t5B5hlCqqEiBRBmcErVA958FkUcFbfqIB3WWjnQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=BuBTcui11cw+IHRCWCi753+svPrjbmzy/W57yGlYgnnGaWuo/235iE64OWtNX90yViQ8yWbiHQgm5+awpDz0RASxiYoBn/Aar10w/4OIeycmb1F1dxo656tff0LN/ZsGpHEPRCTH2XwKeVGLdeMtFxarfAdwpfCLnQcNxE63peI= Received: by 10.151.14.5 with SMTP id r5mr2108668ybi.163.1204096594510; Tue, 26 Feb 2008 23:16:34 -0800 (PST) Received: by 10.150.148.20 with HTTP; Tue, 26 Feb 2008 23:16:34 -0800 (PST) Message-ID: Date: Wed, 27 Feb 2008 07:16:34 +0000 From: "James Strachan" To: camel-user@activemq.apache.org Subject: Re: setting JMSXGroupId property from within a processor In-Reply-To: <15707114.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <15706825.post@talk.nabble.com> <15707114.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org BTW am wondering if the issue is that the processor doesn't create an OUT body - so its gonna reuse the IN? e.g. I wonder if you set the header on the IN, or set some kinda OUT body? On 27/02/2008, Kamal wrote: > > We are using camel 1.2.0 and activemq 4.1.1. Should I try with the 1.3 > snapshot. > > > > James.Strachan wrote: > > > > Which version of Camel are you using BTW? Just wondered if this has > > been fixed since 1.2.0 (we so need 1.3.0 to be released! :) > > > > On 27/02/2008, Kamal wrote: > >> > >> I am trying to set the JMXGroupId property from within a processor using > >> the > >> following code. > >> exchange.getOut().setHeader("JMSXGroupID",groupId); > >> which doesn't work. > >> > >> I also tried to get hold of the underlying JMSMessage by casting the > >> Message > >> object, but the underlying JMS message object is null. > >> Message outMessage = exchange.getOut(); > >> JmsMessage jmsOutMessage = (JmsMessage) outMessage; > >> javax.jms.Message underlyingMessage = > >> jmsOutMessage.getJmsMessage(); > >> System.out.println("underlyingMessage" + > >> underlyingMessage); > >> > >> The requirement is to extract information from the message and set it as > >> a > >> JMSXGroupID. We don't have control over the producer. We are using > >> ActiveMQ, with Camel embedded within the broker. > >> > >> The following is my camel context configuration > >> > >> > >> > >> > >> > >> > >> > >> > >> >> class="xx.GroupIdInsertionProcessor"/> > >> > >> public class GroupIdInsertionProcessor implements Processor { > >> public void process(Exchange exchange) throws Exception { > >> Message inMessage = exchange.getIn(); > >> > >> exchange.getOut().setHeader("JMSXGroupID",inMessage.getBody()); > >> } > >> } > >> > >> > >> Thanks for the help. > >> > >> Regards, > >> Kamal > >> > >> -- > >> View this message in context: > >> http://www.nabble.com/setting-JMSXGroupId-property-from-within-a-processor-tp15706825s22882p15706825.html > >> Sent from the Camel - Users mailing list archive at Nabble.com. > >> > >> > > > > > > -- > > James > > ------- > > http://macstrac.blogspot.com/ > > > > Open Source Integration > > http://open.iona.com > > > > > > > -- > View this message in context: http://www.nabble.com/setting-JMSXGroupId-property-from-within-a-processor-tp15706825s22882p15707114.html > > Sent from the Camel - Users mailing list archive at Nabble.com. > > -- James ------- http://macstrac.blogspot.com/ Open Source Integration http://open.iona.com