activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dejan Bosanac <de...@nighttale.net>
Subject Re: Bytesmessage and http transport
Date Tue, 16 Feb 2010 13:52:08 GMT
Thanks for pointing to this fix Tim.

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 2:42 PM, Timothy Bish <tabish121@gmail.com> wrote:

> On Tue, 2010-02-16 at 05:13 -0800, muadd wrote:
> > Hi,
> > in order to reproduce this, it should be enough to follow these steps
> (I'm
> > assuming 5.2.0 windows binaries):
> > 1) Add <transportConnector name="http" uri="http://172.18.131.66:61223"
> />
> > 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
> >
>
> This issue should be fixed in the 5.4 SNAPSHOT builds, I'd recommend you
> give that a try.  The same issue was reported previously, see:
>
> https://issues.apache.org/activemq/browse/AMQ-1308
>
> 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 <kszyntar@gmail.com> 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
> > >
> >
>
> --
> Tim Bish
>
> Open Source Integration: http://fusesource.com
> ActiveMQ in Action: http://www.manning.com/snyder/
>
> Follow me on Twitter: http://twitter.com/tabish121
> My Blog: http://timbish.blogspot.com/
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message