On 2/6/07, jkurtz <[EMAIL PROTECTED]> 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/