Hello,

A text message takes about twice the size when it is kept in the broker memory.
A warning for that is present in the documentation, see 
https://activemq.apache.org/components/artemis/documentation/latest/large-messages.html#configuring-the-core-client

But I could not find the exact reason for this. E.g. I found no explicit utf-16 
/ ucs-2 encoding logic.
I'm assuming that this is because java Strings are used, which use ucs-2 
internally.
Is that correct? If not, what does cause the use of 2 bytes per character in 
Artemis?
If it is the internal string size, will java9+ then lower the memory use of 
Artemis, as it can detect Latin1/ISO-8859-1 and use byte-encoded strings when 
possible?

Is there any chance that this ratio becomes somehow configurable in the future?
(obviously, sending everything as a bytes-message does that automatically, by 
then I'm unleashing the character conversion problems into the clients)

Thx,
Erwin

Reply via email to