You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Jim Lloyd <jl...@silvertailsystems.com> on 2010/04/05 22:48:10 UTC

Compression on network connections

I'm in the process of building a network of brokers in which some of the
links are geographically distributed. These links will use the SSL transport
for reasons of security, but we also want to use compression to minimize
bandwidth usage over the WAN links. I've searched the available
documentation and so far haven't found a definitive source that tells
whether the SSL Transport uses rfc3749 compression or not. Can anyone here
give me a definitive answer? If it is supported, which configuration options
are required?

It also appears that there is an option to use message level compression. If
compression is available on the SSL transport stream, I expect we would want
to ensure that message compression is turned off to allow the transport
level compression to have more context. The only documentation I have found
for this was for ActiveMQ 3, which implies that doMessageCompression
is trueby default. Is that still the default with ActiveMQ 5?

Thanks,
Jim Lloyd
Silver Tail Systems

Re: Compression on network connections

Posted by Jim Lloyd <jl...@silvertailsystems.com>.
On Tue, Apr 6, 2010 at 9:00 AM, Timothy Bish <ta...@gmail.com> wrote:

> On Tue, 2010-04-06 at 08:55 -0700, Jim Lloyd wrote:
> > On Mon, Apr 5, 2010 at 6:57 PM, Bruce Snyder <br...@gmail.com>
> wrote:
> >
> > > On Mon, Apr 5, 2010 at 2:48 PM, Jim Lloyd <
> jlloyd@silvertailsystems.com>
> > > wrote:
>
> > > It also appears that there is an option to use message level
> compression.
> > > If
> > > > compression is available on the SSL transport stream, I expect we
> would
> > > want
> > > > to ensure that message compression is turned off to allow the
> transport
> > > > level compression to have more context. The only documentation I have
> > > found
> > > > for this was for ActiveMQ 3, which implies that doMessageCompression
> > > > is trueby default. Is that still the default with ActiveMQ 5?
> > >
> > > Message level compression can be enabled on a ConnectionFactory or a
> > > Connection via the useCompression property. See also the
> > > useCompression option on the URI:
> > >
> > > http://activemq.apache.org/connection-configuration-uri.html
> >
> >
> > Thanks. I see the default for useCompression given here is now false.
> We'll
> > experiment and see if this gives us any significant improvement.
> >
> > >
> > -Jim
>
> The trunk code of Apache CMS now supports message body compression, so
> you should be able to test with C++ client's if you build from trunk.
>
> Thanks Tim. However, I'm hoping we can enable useCompression on just the
networkConnector between two brokers, doing something like this:

<networkConnectors>
<networkConnector name="superman-to-batman"
uri="static:(ssl://batman:24001?jms.useCompression=true)"/>
</networkConnectors>

This didn't work though, yielding an error on startup of the broker:
2010-04-06 09:29:45,730  WARN | Could not connect to remote URI:
ssl://batman:24001?jms.useCompression=true: Invalid connect parameters:
{jms.useCompression=true}

Is this not possible, or am I doing something wrong?

Thanks,
Jim

Re: Compression on network connections

Posted by Timothy Bish <ta...@gmail.com>.
On Tue, 2010-04-06 at 08:55 -0700, Jim Lloyd wrote:
> On Mon, Apr 5, 2010 at 6:57 PM, Bruce Snyder <br...@gmail.com> wrote:
> 
> > On Mon, Apr 5, 2010 at 2:48 PM, Jim Lloyd <jl...@silvertailsystems.com>
> > wrote:
> > > I'm in the process of building a network of brokers in which some of the
> > > links are geographically distributed. These links will use the SSL
> > transport
> > > for reasons of security, but we also want to use compression to minimize
> > > bandwidth usage over the WAN links. I've searched the available
> > > documentation and so far haven't found a definitive source that tells
> > > whether the SSL Transport uses rfc3749 compression or not. Can anyone
> > here
> > > give me a definitive answer? If it is supported, which configuration
> > options
> > > are required?
> >
> > Not only is TLS compression is not supported in ActiveMQ, but I don't
> > think it's supported in Java yet. Do you know of an implementation?
> >
> 
> No, I don't, but we do the majority of our development in C++ so even though
> I hadn't found an implementation in my searches so far I still had hope that
> one might exist. Thanks for the clarification.
> 
> >
> > > It also appears that there is an option to use message level compression.
> > If
> > > compression is available on the SSL transport stream, I expect we would
> > want
> > > to ensure that message compression is turned off to allow the transport
> > > level compression to have more context. The only documentation I have
> > found
> > > for this was for ActiveMQ 3, which implies that doMessageCompression
> > > is trueby default. Is that still the default with ActiveMQ 5?
> >
> > Message level compression can be enabled on a ConnectionFactory or a
> > Connection via the useCompression property. See also the
> > useCompression option on the URI:
> >
> > http://activemq.apache.org/connection-configuration-uri.html
> 
> 
> Thanks. I see the default for useCompression given here is now false. We'll
> experiment and see if this gives us any significant improvement.
> 
> >
> -Jim

The trunk code of Apache CMS now supports message body compression, so
you should be able to test with C++ client's if you build from trunk.

Regards

-- 
Tim Bish

Open Source Integration: http://fusesource.com
ActiveMQ in Action: http://www.manning.com/snyder/

Follow me on Twitter: http://twitter.com/tabish121
My Blog: http://timbish.blogspot.com/


Re: Compression on network connections

Posted by Jim Lloyd <jl...@silvertailsystems.com>.
On Mon, Apr 5, 2010 at 6:57 PM, Bruce Snyder <br...@gmail.com> wrote:

> On Mon, Apr 5, 2010 at 2:48 PM, Jim Lloyd <jl...@silvertailsystems.com>
> wrote:
> > I'm in the process of building a network of brokers in which some of the
> > links are geographically distributed. These links will use the SSL
> transport
> > for reasons of security, but we also want to use compression to minimize
> > bandwidth usage over the WAN links. I've searched the available
> > documentation and so far haven't found a definitive source that tells
> > whether the SSL Transport uses rfc3749 compression or not. Can anyone
> here
> > give me a definitive answer? If it is supported, which configuration
> options
> > are required?
>
> Not only is TLS compression is not supported in ActiveMQ, but I don't
> think it's supported in Java yet. Do you know of an implementation?
>

No, I don't, but we do the majority of our development in C++ so even though
I hadn't found an implementation in my searches so far I still had hope that
one might exist. Thanks for the clarification.

>
> > It also appears that there is an option to use message level compression.
> If
> > compression is available on the SSL transport stream, I expect we would
> want
> > to ensure that message compression is turned off to allow the transport
> > level compression to have more context. The only documentation I have
> found
> > for this was for ActiveMQ 3, which implies that doMessageCompression
> > is trueby default. Is that still the default with ActiveMQ 5?
>
> Message level compression can be enabled on a ConnectionFactory or a
> Connection via the useCompression property. See also the
> useCompression option on the URI:
>
> http://activemq.apache.org/connection-configuration-uri.html


Thanks. I see the default for useCompression given here is now false. We'll
experiment and see if this gives us any significant improvement.

>
-Jim

Re: Compression on network connections

Posted by Bruce Snyder <br...@gmail.com>.
On Mon, Apr 5, 2010 at 2:48 PM, Jim Lloyd <jl...@silvertailsystems.com> wrote:
> I'm in the process of building a network of brokers in which some of the
> links are geographically distributed. These links will use the SSL transport
> for reasons of security, but we also want to use compression to minimize
> bandwidth usage over the WAN links. I've searched the available
> documentation and so far haven't found a definitive source that tells
> whether the SSL Transport uses rfc3749 compression or not. Can anyone here
> give me a definitive answer? If it is supported, which configuration options
> are required?

Not only is TLS compression is not supported in ActiveMQ, but I don't
think it's supported in Java yet. Do you know of an implementation?

> It also appears that there is an option to use message level compression. If
> compression is available on the SSL transport stream, I expect we would want
> to ensure that message compression is turned off to allow the transport
> level compression to have more context. The only documentation I have found
> for this was for ActiveMQ 3, which implies that doMessageCompression
> is trueby default. Is that still the default with ActiveMQ 5?

Message level compression can be enabled on a ConnectionFactory or a
Connection via the useCompression property. See also the
useCompression option on the URI:

http://activemq.apache.org/connection-configuration-uri.html

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

ActiveMQ in Action: http://bit.ly/2je6cQ
Blog: http://bruceblog.org/
Twitter: http://twitter.com/brucesnyder