qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Danushka Menikkumbura <danushka.menikkumb...@gmail.com>
Subject Sending large messages through Java broker (QPID-2902)
Date Thu, 06 Jan 2011 19:23:12 GMT
Hi devs,

I have fixed this issue and attached a patch to [1].

Initially it looked as if it was an encoding issue but when I had a closer
look I could see that the issue lied in the frame assembler.

Actually the message segments generated in the Assembler.java (lines
158-162) were corrupted as a result of scrambled frame body content.

Assembler.frame() receives frames of a given message that are stored in a
list and assembled and sent forward as soon as the last frame is received.
The frame body content gets corrupted during this transition. This is due to
a flaw in the frame body content formation logic in the broker transport
input handler.

The InputHandler uses a fixed-length ByteBuffer which gets filled with
incoming data stream and frame content is formed by slicing this buffer.
When a ByteBuffer is sliced, the new buffer is a shared subsequence of the
original buffer's content and changes to the original buffer is visible in
the new buffer and vice versa. Because of this reason, frame content stored
in the segment gets corrupted and as a result the content of final AMQP
message gets corrupted.

Please review and apply the patch.

[1] - https://issues.apache.org/jira/browse/QPID-2902


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