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: Friday 11:25 AM
Return to search
Component/s: Transport
Affects Version/s: 4.1.1
Fix Version/s: NEEDS_REVIEWED

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

Patch Info: Patch Available


 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 made changes - 11/Jul/07 09:17 AM
Field Original Value New Value
Attachment TextWireFormat.patch [ 15582 ]
Eddie Epstein made changes - 24/Jul/07 07:39 AM
Attachment TextWireFormat.patch [ 15582 ]
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.

Eddie Epstein made changes - 27/Jul/07 09:05 AM
Attachment HttpProblems.patch [ 15630 ]
Rob Davies made changes - 19/Aug/07 10:37 PM
Fix Version/s 5.2.0 [ 11841 ]
Gary Tully made changes - 08/Sep/08 07:54 AM
Fix Version/s 5.2.0 [ 11841 ]
Fix Version/s 5.3.0 [ 11914 ]
Gary Tully made changes - 20/May/09 06:42 AM
Fix Version/s 5.3.0 [ 11914 ]
Fix Version/s 5.4.0 [ 12110 ]
Bruce Snyder made changes - 20/Nov/09 07:40 AM
Fix Version/s 5.4.0 [ 12110 ]
Fix Version/s AGING_TO_DIE [ 12187 ]
Bruce Snyder made changes - 20/Nov/09 11:25 AM
Patch Info [Patch Available]
Fix Version/s AGING_TO_DIE [ 12187 ]
Fix Version/s NEED_REVIEWED [ 12186 ]