The JMS API states that the methods of JMS BytesMessage "are based largely on those found in |java.io.DataInputStream| and |java.io.DataOutputStream|." which is why most implementations will rightly encode using a size value of two bytes to match that of the DataOutputStream writeUTF implementation.  It would make it troublesome to map between protocols in the broker is the core bits were to switch over to a four byte size as it would go against what clients in the other protocols are doing.

On 1/15/19 1:02 PM, Justin Bertram wrote:
When the UTF string is written to the byte buffer the size is written as an
unsigned short which has a max size of 65,535. This may be possible to
change, but there will be compatibility issues to deal with for older
clients which send buffers using the old format.

Justin

On Tue, Jan 15, 2019 at 11:29 AM Youyu Shao <youyus...@crd.com> wrote:

Hi,

What is the reason that method: public void writeUTF(final String value) of
org.apache.activemq.artemis.jms.client.ActiveMQBytesMessage.java imposes
length limit on the input string parameter? It seems that the length is
limited to either 32767 (or 65535).

writeUTF(…) is a JMS interface method on BytesMessage, which does not seem
to have such limitation.

Can this be lifted to integer length?

Thanks




--
Sent from:
http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html


--
Tim Bish

Reply via email to