This content has been marked as final. Show 3 replies
I now think it is the size of the messages that causes this, but I do not understand this as it is a byte queue and not a text queue???
By using writeBytes instead of writeUTF I solved the problem.
I haven't found any documentation about max. size when writing UTF, though.
If you look at the BytesMessage documentation it says "The BytesMessage methods are based largely on those found in java.io.DataInputStream and java.io.DataOutputStream." If you then look at the DataOutputStream.writeUTF method documentation it says "First, two bytes are written to the output stream as if by the writeShort method giving the number of bytes to follow. This value is the number of bytes actually written out, not the length of the string." So any length which requires more than two bytes to encode will cause a problem.