Issue Details (XML | Word | Printable)

Key: AMQ-1308
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Eddie Epstein
Votes: 4
Watchers: 4
Operations

If you were logged in you would be able to see more operations.
ActiveMQ

Messages delivered from HttpTunnelServlet connected broker are limited to 64K bytes.

Created: 03/Jul/07 01:31 PM   Updated: 20/May/09 06:42 AM
Component/s: Transport
Affects Version/s: 4.1.1
Fix Version/s: 5.4.0

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works HttpProblems.patch 2007-07-27 09:05 AM Eddie Epstein 2 kB
Environment: Java consumer receiving messages using HTTP connector


 Description  « Hide
In TextWireFormat.java: the methods writeUTF/readUTF are used in the code path to deliver messages from an HTTP connected broker.

public void marshal(Object command, DataOutput out) throws IOException { out.writeUTF(marshalText(command)); }

public Object unmarshal(DataInput in) throws IOException { String text = in.readUTF(); return unmarshalText(text); }

These methods limit the max message size to 64K. Messages sent to an HTTP connected broker do not have the same limitation.

Problem first reported in activemq-users with the subject "UTFDataFormatException in broker when using a http transportConnector".

THanks,
Eddie



 All   Comments   Work Log   Change History   Subversion Commits   FishEye   Crucible      Sort Order: Ascending order - Click to sort in descending order
Eddie Epstein added a comment - 11/Jul/07 09:17 AM
TextWireFormat.patch fixes this issue. The data is written out in UTF8, which has the same size wire format as that previously created by writeUTF, and is preceded by a 4 byte length. There is an extra copy of the data created on both sending and receiving sides, but then again, it works.

Eddie Epstein added a comment - 24/Jul/07 07:42 AM
The patch submitted did in fact "work", but only for restricted message content: ascii characters.

Somewhat embarrassed,
Eddie


Eddie Epstein added a comment - 27/Jul/07 09:05 AM
Turns out there is another bug: the HTTP connector is completely broken for multi-byte UTF-8 characters. The attached patch file includes fixes for both the 64K limit (same fix as previously submitted) and for the bad decode of the Http request body.