You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by billy <Bi...@bnsflogistics.com> on 2013/01/02 23:19:08 UTC
Bandwidth - Limit throughput by number of bytes per second
I have two ActiveMQ-5.5.1 broker's connected together using a
NetworkConnector. One broker is local and the other broker is at a remote
site. The remote network connection is limited to approximately 5 MB/sec.
How can I throttle the remote network connection to say 1 or 2 MB/sec so
other applications on the remote machine can access the network without
blocking for ling periods of time?
I know that I can limit the number of messages per polling period, but I'm
expecting to transfer one HUGE tiff file from the remote machine to the
local machine so that won't help.
--
View this message in context: http://activemq.2283324.n4.nabble.com/Bandwidth-Limit-throughput-by-number-of-bytes-per-second-tp4661241.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Bandwidth - Limit throughput by number of bytes per second
Posted by Gary Tully <ga...@gmail.com>.
that factory is plugable, so you could extend
ConditionalNetworkBridgeFilterFactory
with your own limiter implementation.
It can be specified via a bean in the xml configuration for a network
connector.
It would make a nice patch to add that option :-)
in any event please raise an enhancement request, it makes sense to have a
byte limit.
On 3 January 2013 16:35, billy <Bi...@bnsflogistics.com> wrote:
> I'm currently using ActiveMQ-5.5.1. The
> ConditionalNetworkBridgeFilterFactory was first implemented in 5.6.0 so I
> would have to upgrade to get this factory. Second, the setRateLimit method
> looks like the units are in MESSAGES/duration and not bytes/duration.
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Bandwidth-Limit-throughput-by-number-of-bytes-per-second-tp4661241p4661272.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
--
http://redhat.com
http://blog.garytully.com
Re: Bandwidth - Limit throughput by number of bytes per second
Posted by Christian Posta <ch...@gmail.com>.
Yep, that's correct. It's a messages/second.
Let me give it a deeper look when I get a second. Apollo uses HawtDispatch
which uses transports that have an optional rate limiter like the one
you're looking for, so I wonder if somethings similar can be done for
ActiveMQ.
On Thu, Jan 3, 2013 at 9:35 AM, billy <Bi...@bnsflogistics.com>wrote:
> I'm currently using ActiveMQ-5.5.1. The
> ConditionalNetworkBridgeFilterFactory was first implemented in 5.6.0 so I
> would have to upgrade to get this factory. Second, the setRateLimit method
> looks like the units are in MESSAGES/duration and not bytes/duration.
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Bandwidth-Limit-throughput-by-number-of-bytes-per-second-tp4661241p4661272.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
--
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta
Re: Bandwidth - Limit throughput by number of bytes per second
Posted by billy <Bi...@bnsflogistics.com>.
I'm currently using ActiveMQ-5.5.1. The
ConditionalNetworkBridgeFilterFactory was first implemented in 5.6.0 so I
would have to upgrade to get this factory. Second, the setRateLimit method
looks like the units are in MESSAGES/duration and not bytes/duration.
--
View this message in context: http://activemq.2283324.n4.nabble.com/Bandwidth-Limit-throughput-by-number-of-bytes-per-second-tp4661241p4661272.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Bandwidth - Limit throughput by number of bytes per second
Posted by billy <Bi...@bnsflogistics.com>.
Do you know what the units are for setRateLimit(int rateLimit)? The test
code you showed me looks like the units are in messages and that will not
work for me because I am sending just one message (file) that is huge - it
is a TIFF file. I need the rate units to be something like bytes per
second. Perhaps there is a way to set the units in that test code and I
missed it.
--
View this message in context: http://activemq.2283324.n4.nabble.com/Bandwidth-Limit-throughput-by-number-of-bytes-per-second-tp4661241p4661264.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Bandwidth - Limit throughput by number of bytes per second
Posted by Christian Posta <ch...@gmail.com>.
Check out this test case around line 303:
http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerQueueClientsReconnectTest.java?view=markup
On Thu, Jan 3, 2013 at 7:23 AM, billy <Bi...@bnsflogistics.com>wrote:
> I read about that too and it sounds like it will work, but I couldn't find
> any examples showing how to use it. Do you know where any examples of its
> use might be?
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Bandwidth-Limit-throughput-by-number-of-bytes-per-second-tp4661241p4661262.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
--
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta
Re: Bandwidth - Limit throughput by number of bytes per second
Posted by billy <Bi...@bnsflogistics.com>.
I read about that too and it sounds like it will work, but I couldn't find
any examples showing how to use it. Do you know where any examples of its
use might be?
--
View this message in context: http://activemq.2283324.n4.nabble.com/Bandwidth-Limit-throughput-by-number-of-bytes-per-second-tp4661241p4661262.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Bandwidth - Limit throughput by number of bytes per second
Posted by Christian Posta <ch...@gmail.com>.
I haven't tried it, but you can take a look at
the ConditionalNetworkBridgeFilterFactory which can throttle messages to
subscriptions.
See bottom of this wiki:
http://activemq.apache.org/networks-of-brokers.html
On Wed, Jan 2, 2013 at 3:19 PM, billy <Bi...@bnsflogistics.com>wrote:
> I have two ActiveMQ-5.5.1 broker's connected together using a
> NetworkConnector. One broker is local and the other broker is at a remote
> site. The remote network connection is limited to approximately 5 MB/sec.
> How can I throttle the remote network connection to say 1 or 2 MB/sec so
> other applications on the remote machine can access the network without
> blocking for ling periods of time?
>
> I know that I can limit the number of messages per polling period, but I'm
> expecting to transfer one HUGE tiff file from the remote machine to the
> local machine so that won't help.
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Bandwidth-Limit-throughput-by-number-of-bytes-per-second-tp4661241.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
--
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta