activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Davies <rajdav...@gmail.com>
Subject Re: Bytesmessage and http transport
Date Tue, 16 Feb 2010 16:09:44 GMT
Did you try this on 5.4-SNAPSHOT ?- I think there's a fix in trunk
On 16 Feb 2010, at 13:13, 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
>
>
> 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
>>
>
> -- 
> 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.
>

Rob Davies
http://twitter.com/rajdavies
I work here: http://fusesource.com
My Blog: http://rajdavies.blogspot.com/
I'm writing this: http://www.manning.com/snyder/






Mime
View raw message