Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 29115 invoked from network); 2 Mar 2007 14:51:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Mar 2007 14:51:33 -0000 Received: (qmail 11806 invoked by uid 500); 2 Mar 2007 14:51:41 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 11784 invoked by uid 500); 2 Mar 2007 14:51:41 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 11775 invoked by uid 99); 2 Mar 2007 14:51:40 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Mar 2007 06:51:40 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of james.strachan@gmail.com designates 64.233.182.188 as permitted sender) Received: from [64.233.182.188] (HELO nf-out-0910.google.com) (64.233.182.188) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Mar 2007 06:51:29 -0800 Received: by nf-out-0910.google.com with SMTP id y38so1307965nfb for ; Fri, 02 Mar 2007 06:51:08 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=eauHB2qlO2OLjA1m4rHcyLMY6+q+OpMOlqzCaUmhYKqfAiiXRHY4zmuIB2gvLgUdONYAFZc66XLF7RDn+b0rH75/7GR/lq92lIGJQV/3C35degSvXhtHspYOt1R+llNo3kRbIbT+I8wjTeITssHuJpTKwbSUady8r/HvO2Qc3wA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=tfMzpt6OdA0IHIqF3F4tuHmWeeJ4DpndMFTLhkp6l6HHUtRoy+3Px7o87s2xVo13ZdCJXWcyNvunzpN76XP6yXgURkzIq9/Rp+LXW+7HMuwee380piyWI/a+g7k78hzVlcxQdmZiaL4nPW6Rf5hvePnym1r3L16leIa62PFtiZc= Received: by 10.78.183.15 with SMTP id g15mr272621huf.1172847067906; Fri, 02 Mar 2007 06:51:07 -0800 (PST) Received: by 10.78.155.7 with HTTP; Fri, 2 Mar 2007 06:51:07 -0800 (PST) Message-ID: Date: Fri, 2 Mar 2007 14:51:07 +0000 From: "James Strachan" To: users@activemq.apache.org Subject: Re: [Spam: 5.0] Pausing Transmission In-Reply-To: <9270539.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <8788056.post@talk.nabble.com> <8818110.post@talk.nabble.com> <9270539.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org That all sounds great - particularly the bit about contributing changes back to the project :) The best place to start is probably to write your own TransportFilter to do the stuff you need (allowing pause/resume/monitor throughput etc etc). If you need closer integration with the TCP layer you might even wanna inherit from the TcpTransport* stuff. (e.g. you might wanna add hooks to the TcpInputStream/TcpOuputStream to count the bytes moved etc). To simplify the integration; it might be easiest for each of your custom TransportFilter implementations to lookup in JMX some controller MBean that can be used as a single point to hold the policy information and act as a global start/stop guage etc. (Or worst case, a static variable :) Please do let us know how you get on & please do submit any patches that helps you implement this feature... http://activemq.apache.org/contributing.html On 3/2/07, jkurtz wrote: > > James > > Again, thanks for taking the time to help. We got some feedback from the > customer, they want to be able to do the Quality of Service measurements and > control from outside of Active MQ. We still want to control the transport, > turning it on and off, but we want to empower the Broker object to do this. > However, if you can think of a better way to control transmission > externally, please let me know. > > We would like to add the methods "stopTransport" and "startTransport" to the > broker object, then modify the TcpTransportServer or other class to > implement this. We would this to work across all connections. The QoS engine > would then utilize an Embedded Broker application to control the message > flow. Placing control outside of ActiveMQ allows for the measurement and Qos > algoritms to be changed without having to modify the Active MQ source code. > > Any changes we make and the documentation will be released for evaluation > and hopefully integration back into the main Active MQ branch. Adding the > QoS capability increases the usefulness of this, as Active MQ can be used as > a means of controlling network traffic. > > thanks much > > John > > > > ======================== > > James.Strachan wrote: > > > > On 2/6/07, jkurtz wrote: > >> > >> The reason that the dispatch needs to be paused on the Server side is for > >> a > >> Quality of Service Broker to control the message dispatch if the network > >> traffic gets to be too much. This is similar to the client Pre-Fetch > >> Limit, > >> except the messages are measured and controlled on servicer hosting the > >> Active MQ instance, and not the client. > >> > >> We want to create a server-side implementation of the prefetch limit. > >> Instead of using the client acknowledgements to control messaging, we > >> want > >> to use QoS service parameters on the Server to pause the dispatch. > >> > >> I can provide more details if you wish. > > > > OK I get it now, thanks. It sounds like the best thing to do is to > > write your own derivation of TcpTransportFactory and > > TcpTransportServer overloading the createTransport() method as its > > only the broker side you need to change - so that each Transport that > > gets created for each connection to the broker gets wrapped in your > > own TransportFilter wrapper object which does the flow control (only > > allowing so many bytes per second or whatever). Whether you want to do > > the flow control across all connections, or on a per connection basis > > is your call. > > > > By all means ask for more help as you try to implement this (maybe > > chatting further on dev@activemq.apache.org is better) - if you would > > like to donate a patch we could make this a standard feature of > > ActiveMQ. e.g. we could use a property on the TcpTransportServer to > > indicate the throttling rate to use, which if its set we wrap the > > TcpTransport in a throttler TransportFilter. > > > > -- > > > > James > > ------- > > http://radio.weblogs.com/0112098/ > > > > > > -- > View this message in context: http://www.nabble.com/Pausing-Transmission-tf3167927s2354.html#a9270539 > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > > -- James ------- http://radio.weblogs.com/0112098/