Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 38426 invoked from network); 6 Oct 2009 19:28:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 6 Oct 2009 19:28:19 -0000 Received: (qmail 50217 invoked by uid 500); 6 Oct 2009 19:28:18 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 50170 invoked by uid 500); 6 Oct 2009 19:28:18 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 50160 invoked by uid 99); 6 Oct 2009 19:28:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Oct 2009 19:28:18 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of tabish121@gmail.com designates 209.85.218.224 as permitted sender) Received: from [209.85.218.224] (HELO mail-bw0-f224.google.com) (209.85.218.224) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Oct 2009 19:28:06 +0000 Received: by bwz24 with SMTP id 24so3664051bwz.38 for ; Tue, 06 Oct 2009 12:26:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:in-reply-to :references:content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; bh=JLALfcsf+iA+yHECUAA7JGvjmHOOYDVVfMhvrxTkDow=; b=pZTTliu6awGqnhL8OX+GvCcnxYSNBfZTyuMGqs0P3xi8bI9Shteagurp0vrUhVqo25 v5Opy7sDbrdrVgXhAV+v4tASSYh+6S1YSzvAcDKEsWURH9iNcgXieHRHVdOBCXATLDkE MlDGZsCSO/nIkHYLV6rtDGXlzqe5UIvU/59eA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:in-reply-to:references:content-type:date:message-id :mime-version:x-mailer:content-transfer-encoding; b=SDqCbLodsCCpJ6E7/eo74gZ932lS0gaROZhV4hmdA5MYYBBlpXxLJwboCRgzMNaEgF IF5jc9/0N3palUsfTISlxVN5cax4MSpQK1YowGjkYa1/J6uIhXnfKJI2J+dWH1nW9S7I mP9+rJMMHREneJjjwpnIo2RPL+JouhQ2jVqj0= Received: by 10.102.248.14 with SMTP id v14mr557989muh.74.1254857206267; Tue, 06 Oct 2009 12:26:46 -0700 (PDT) Received: from ?192.168.2.150? (c-69-138-183-90.hsd1.va.comcast.net [69.138.183.90]) by mx.google.com with ESMTPS id j6sm1219754mue.20.2009.10.06.12.26.42 (version=SSLv3 cipher=RC4-MD5); Tue, 06 Oct 2009 12:26:45 -0700 (PDT) Subject: Re: ActiveMQ message content is truncated From: Timothy Bish To: users@activemq.apache.org In-Reply-To: <25775002.post@talk.nabble.com> References: <25769997.post@talk.nabble.com> <25775002.post@talk.nabble.com> Content-Type: text/plain Date: Tue, 06 Oct 2009 15:26:38 -0400 Message-Id: <1254857198.2937.14.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 (2.26.3-1.fc11) Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On Tue, 2009-10-06 at 12:19 -0700, zeptov wrote: > I copied the wrong code for the sender. Here's an update with some more > debugging. > > The length of the message content before sending is 10366. When received, > all properties are okay; the message content key is present, but the content > is an empty string. > Could you open a new Jira issue for this problem and attach your short, but complete sender receiver test app. This looks to be a bug, opening an issue will make sure it doesn't get lost. Regards Tim. > Sender: > > > try > { > session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); > MessageProducer producer = null; > Topic topic = session.createTopic(getSubject()); > producer = session.createProducer(topic); > producer.setDeliveryMode(DeliveryMode.PERSISTENT); > MapMessage mapMessage = session.createMapMessage(); > if(properties!=null && !properties.isEmpty()) > { > java.util.Iterator keyIter = properties.keySet().iterator(); > while(keyIter.hasNext()) > { > String key = keyIter.next(); > mapMessage.setStringProperty(key, properties.get(key)); > } > } > mapMessage.setString("MessageContent", xmlCommand); > logger.info("Message content length=" + > mapMessage.getString("MessageContent").length()); > producer.send(mapMessage); > } > > > Receiver: > > > private void receiver_Listener(IMessage message) > { > IMapMessage mapMessage = message as IMapMessage; > if (mapMessage != null) > { > string content = mapMessage.Body.GetString("MessageContent"); > Logger.Info("Body count=" + mapMessage.Body.Count); > Logger.Info("Prop count=" + mapMessage.Properties.Count); > foreach (string curkey in mapMessage.Body.Keys) > { > Logger.Info("Body Key=" + curkey + ", value=" + > mapMessage.Body[curkey]); > } > foreach (string curkey in mapMessage.Properties.Keys) > { > Logger.Info("Prop Key=" + curkey + ", value=" + > mapMessage.Properties[curkey]); > } > } > } > >