Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 13102 invoked from network); 16 Feb 2010 13:13:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 16 Feb 2010 13:13:36 -0000 Received: (qmail 93514 invoked by uid 500); 16 Feb 2010 13:13:36 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 93446 invoked by uid 500); 16 Feb 2010 13:13:36 -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 93436 invoked by uid 99); 16 Feb 2010 13:13:36 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Feb 2010 13:13:36 +0000 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=NORMAL_HTTP_TO_IP,SPF_HELO_PASS,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.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; Tue, 16 Feb 2010 13:13:25 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1NhNEe-0000uv-Rw for users@activemq.apache.org; Tue, 16 Feb 2010 05:13:04 -0800 Message-ID: <27608063.post@talk.nabble.com> Date: Tue, 16 Feb 2010 05:13:04 -0800 (PST) From: muadd To: users@activemq.apache.org Subject: Re: Bytesmessage and http transport In-Reply-To: <36e91d9d1002160242l128c1443ubded8d0ce2a7204e@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: kszyntar@gmail.com References: <21974419.post@talk.nabble.com> <36e91d9d0902130816se588347q8a7d6c486d12ff63@mail.gmail.com> <27605308.post@talk.nabble.com> <36e91d9d1002160242l128c1443ubded8d0ce2a7204e@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org Hi, in order to reproduce this, it should be enough to follow these steps (I'm assuming 5.2.0 windows binaries): 1) Add to your activemq.xml config file in transportConnectors (change the uri to match your ip address) 2) run consumer and producer ant build provided as examples with the distribution, with the following parameters: consumer -Durl=http://172.18.131.66:61223 -DsleepTime=1000 producer -Durl=http://172.18.131.66:61223 -DsleepTime=1000 -DmessageSize=100000 (again, with appropriate url parameter) 3) the moment amq tries to deliver first message to the consumer (i.e. render the response to the HTTP GET request), the exception occurs The reason for the problem - so it seems - is the use of java DataOutputStream.writeUTF - the implementation being limited to 64k buffer. The workaround I'd suggest is to use the OutputStreamWriter instead: OutputStreamWriter out = new OutputStreamWriter(stream, "UTF-8"); out.write(message); best regards Dejan Bosanac wrote: > > Hi, > > thanks for raising the issue. Is there a chance you can provide a > reproducible test case? > > Cheers > -- > Dejan Bosanac - http://twitter.com/dejanb > > Open Source Integration - http://fusesource.com/ > ActiveMQ in Action - http://www.manning.com/snyder/ > Blog - http://www.nighttale.net > > > On Tue, Feb 16, 2010 at 10:05 AM, muadd wrote: > >> >> Hi, >> >> I've encountered similar problem with http transport. When I try to get a >> message with 100KB+ payload (tried TextMessage and MapMessage), I get: >> >> 2010-02-16 09:37:28,147 | WARN | / | org.mortbay.log | btpool0-1 - / >> java.io.UTFDataFormatException: encoded string too long: 219486 bytes >> at java.io.DataOutputStream.writeUTF(DataOutputStream.java:347) >> at java.io.DataOutputStream.writeUTF(DataOutputStream.java:306) >> at >> >> org.apache.activemq.transport.util.TextWireFormat.marshal(TextWireFormat.java:44) >> at >> >> org.apache.activemq.transport.http.HttpTunnelServlet.doGet(HttpTunnelServlet.java:86) > [cut] > > > > ----- > Dejan Bosanac > > Open Source Integration - http://fusesource.com/ > ActiveMQ in Action - http://www.manning.com/snyder/ > Blog - http://www.nighttale.net > -- View this message in context: http://old.nabble.com/Bytesmessage-and-http-transport-tp21974419p27608063.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.