Return-Path: Delivered-To: apmail-activemq-camel-user-archive@locus.apache.org Received: (qmail 3884 invoked from network); 24 Nov 2008 11:44:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Nov 2008 11:44:35 -0000 Received: (qmail 61313 invoked by uid 500); 24 Nov 2008 11:44:40 -0000 Delivered-To: apmail-activemq-camel-user-archive@activemq.apache.org Received: (qmail 61057 invoked by uid 500); 24 Nov 2008 11:44:38 -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 60988 invoked by uid 99); 24 Nov 2008 11:44:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Nov 2008 03:44:37 -0800 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Nov 2008 11:43:10 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1L4Zr9-0001ac-Qw for camel-user@activemq.apache.org; Mon, 24 Nov 2008 03:43:55 -0800 Message-ID: <20659410.post@talk.nabble.com> Date: Mon, 24 Nov 2008 03:43:55 -0800 (PST) From: mta38 To: camel-user@activemq.apache.org Subject: JMS - javax.jms.BytesMessage - Properties can't be retrieved in JmsExchange MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: mtaraud.ext@orange-ftgroup.com X-Virus-Checked: Checked by ClamAV on apache.org Hi all, I have a producer that send BytesMessage object on a queue (ActiveMq is the broker). Here is the code of producer BytesMessage message = queueSession.createBytesMessage(); byte[] body = prepareRequestBody(); message.writeBytes(body); message.setStringProperty(Constants.MAINCLIENT, "TEST"); queueProducer.send(message); QueueReceiver queueConsumer = queueSession.createReceiver(queueResponse); All here is OK, message is sent to the jms endpoint. But when I explore the Exchange object in the first processor which deals with the message I can notice the IN message object have no property. Following is my processor implementation public void process(Exchange exchange) throws Exception { try { JmsExchange jmse =(JmsExchange)exchange; BytesMessage jmsMsg = (BytesMessage)jmse.getIn(); String ss = jmsMsg.getStringProperty(Constants.MAINCLIENT); System.out.println("PROPERTY ==> "+ss); UUID uuid = UUID.randomUUID(); exchange.getIn().setHeader(Constants.IDMESSAGE, uuid.toString()); } catch(Exception ex) { exchange.getFault().setBody(ex); } May be there are something wrong in my code but I can't see what :confused:. Any help are welcome. Thanks in advance Mta38 -- View this message in context: http://www.nabble.com/JMS---javax.jms.BytesMessage---Properties-can%27t-be-retrieved-in-JmsExchange-tp20659410s22882p20659410.html Sent from the Camel - Users mailing list archive at Nabble.com.