You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by kal2 <ki...@gmail.com> on 2016/02/23 15:45:16 UTC

why MSG size in activemq is much larger than payload

I am sending 400byte msg to activemq but when I see the msg size in activemq
it shows size of each msg as ~1472 byte msg.  Why is the size so much larger
than the payload?  How to reduce the overhead?



--
View this message in context: http://activemq.2283324.n4.nabble.com/why-MSG-size-in-activemq-is-much-larger-than-payload-tp4708070.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: why MSG size in activemq is much larger than payload

Posted by artnaseef <ar...@artnaseef.com>.
Chistopher is correct here.

Is there any reason why this larger value is a concern?



--
View this message in context: http://activemq.2283324.n4.nabble.com/why-MSG-size-in-activemq-is-much-larger-than-payload-tp4708070p4708430.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: why MSG size in activemq is much larger than payload

Posted by Christopher Shannon <ch...@gmail.com>.
The real issue to me is how much space the message uses in the heap.  That
size value is important because it is used to help prevent out of memory
errors.  The usage calculations are based off of it so you don't want to
underestimate the message size in memory.

One thing you could do would be to take a heap dump of your messages in
memory and see exactly how much space they are using up if you want to try
and set the size to a more accurate value.  That being said, I wouldn't
really be too concerned with that size value since again it's just an
estimation and used for things like usage tracking.  Changing the minimum
size that the method reports isn't going to change how much space the
actual message is using in memory or on disk.

On Tue, Feb 23, 2016 at 4:08 PM, kal2 <ki...@gmail.com> wrote:

> any idea how changing the value to something lower will impact the
> broker?  I
> expect the size of the msg payload to be between 400bytes to 1kb?
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/why-MSG-size-in-activemq-is-much-larger-than-payload-tp4708070p4708155.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: why MSG size in activemq is much larger than payload

Posted by kal2 <ki...@gmail.com>.
any idea how changing the value to something lower will impact the broker?  I
expect the size of the msg payload to be between 400bytes to 1kb?   



--
View this message in context: http://activemq.2283324.n4.nabble.com/why-MSG-size-in-activemq-is-much-larger-than-payload-tp4708070p4708155.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: why MSG size in activemq is much larger than payload

Posted by Christopher Shannon <ch...@gmail.com>.
There is a default minimum amount of 1024 bytes and then the rest of the
content length and properties are added to that.  I believe this is done to
account for the encoding of the protocol used and for performance reasons
so it's not all that accurate and is more of an estimation.

You can override the minimum message size setting as part of the Policy.
Take a look at http://activemq.apache.org/per-destination-policies.html and
look at the minimumMessageSize property.

On Tue, Feb 23, 2016 at 9:45 AM, kal2 <ki...@gmail.com> wrote:

> I am sending 400byte msg to activemq but when I see the msg size in
> activemq
> it shows size of each msg as ~1472 byte msg.  Why is the size so much
> larger
> than the payload?  How to reduce the overhead?
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/why-MSG-size-in-activemq-is-much-larger-than-payload-tp4708070.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>