Github user franz1981 commented on the issue:
https://github.com/apache/activemq-artemis/pull/2274
@tabish121 @gemmellr I will be probably able to take a further look on it
after wednesday...
Anyway I think that this PR as it is will just fix the bug at a performance
cost: ByteBufUtil.utf8Bytes has a O(n) cost while ByteBufUtil.utf8MaxBytes is
O(1).
A trivial fix with no performance hit that assume that the ByteBuffer has
been sized with enough space to hold the encoded string would be to use
```ByteBufUtil.reserveAndWriteUtf8(nettyBuffer, value,
nettyBuffer.writableBytes());``` instead, but I'm not sure if
NettyWritable::put(String) can safely assume it.
---