activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Burton <bur...@spinn3r.com>
Subject Re: compressed activemq messages
Date Sat, 14 Mar 2015 18:23:43 GMT
Ah. Yes.  Good point.  I’ll look at the headers.  Header compression is
always one of the last things to not be implemented.

I’m also looking at trading some latency for throughput by using message
batching.  This would mean I can take 100 messages and elide them into one
which would then get much better compression.

On Sat, Mar 14, 2015 at 7:42 AM, Tim Bain <tbain@alumni.duke.edu> wrote:

> Your message bodies have to be pretty large for the headers to not be the
> lion's share of the space usage...  I haven't looked at memory usage
> specifically, but I can confirm that using compression does make a
> difference to the size of the packets on the wire (testing with 20KB highly
> repetitive XML messages that compressed well) so I'd expect a similar
> improvement in memory, even given the overhead from the objects themselves.
> On Mar 13, 2015 10:03 PM, "Kevin Burton" <burton@spinn3r.com> wrote:
>
> > Huh.  I just ran a test and it looks like it didn’t actually save much
> > memory in practice.
> >
> > Kevin
> >
> > On Fri, Mar 13, 2015 at 2:40 PM, Kevin Burton <burton@spinn3r.com>
> wrote:
> >
> > > Awesome!  Thanks fro the explanation.  I’ll run some memory benchmarks
> > and
> > > see what type of memory efficiency this yields.
> > >
> > > Kevin
> > >
> > > On Fri, Mar 13, 2015 at 2:25 PM, Tim Bain <tbain@alumni.duke.edu>
> wrote:
> > >
> > >> The first time the message crosses a network link with
> > >> useCompression=true,
> > >> the body of the message will be compressed.  It will stay compressed
> > until
> > >> it is read (by a consumer, by browsing the queue on the broker, by an
> > >> embedded Camel route that examines the body, etc.), after which it
> will
> > >> stay uncompressed until it crosses another network link where
> > >> useCompression=true.
> > >>
> > >> So if your producers send messages to the broker across a connection
> > where
> > >> useCompression=true and you don't do anything with the message on the
> > >> broker, its body will be compressed for the entire time it's in the
> > >> broker's memory.  Headers, however, are always uncompressed.
> > >>
> > >> Tim
> > >>
> > >> On Fri, Mar 13, 2015 at 3:11 PM, Kevin Burton <burton@spinn3r.com>
> > wrote:
> > >>
> > >> > I’m confused about activemq message compression:
> > >> >
> > >> > http://activemq.apache.org/connection-configuration-uri.html
> > >> >
> > >> > useCompression
> > >> > > Enables the use of compression of the message bodies
> > >> >
> > >> > Is this just wire protocol compression or is this compression of the
> > >> > objects in memory?
> > >> >
> > >> > It would be interesting to have the messages (and headers)
> compressed
> > in
> > >> > memory to minimize JVM heap usage within the broker.
> > >> >
> > >> > Kevin
> > >> >
> > >> >
> > >> > --
> > >> >
> > >> > Founder/CEO Spinn3r.com
> > >> > Location: *San Francisco, CA*
> > >> > blog: http://burtonator.wordpress.com
> > >> > … or check out my Google+ profile
> > >> > <https://plus.google.com/102718274791889610666/posts>
> > >> > <http://spinn3r.com>
> > >> >
> > >>
> > >
> > >
> > >
> > > --
> > >
> > > Founder/CEO Spinn3r.com
> > > Location: *San Francisco, CA*
> > > blog: http://burtonator.wordpress.com
> > > … or check out my Google+ profile
> > > <https://plus.google.com/102718274791889610666/posts>
> > > <http://spinn3r.com>
> > >
> > >
> >
> >
> > --
> >
> > Founder/CEO Spinn3r.com
> > Location: *San Francisco, CA*
> > blog: http://burtonator.wordpress.com
> > … or check out my Google+ profile
> > <https://plus.google.com/102718274791889610666/posts>
> > <http://spinn3r.com>
> >
>



-- 

Founder/CEO Spinn3r.com
Location: *San Francisco, CA*
blog: http://burtonator.wordpress.com
… or check out my Google+ profile
<https://plus.google.com/102718274791889610666/posts>
<http://spinn3r.com>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message