On 9/22/06, colincrist <[EMAIL PROTECTED]> wrote:
Hi, I'm looking for a way to configure/implement a throttle on the number of messages a client (over any transport) can send or receive messages, initially just by a rate (e.g. 10 per second) but possibly in the future by bandwidth (e.g. 1G per day) based on users or remote IP addresses/ranges. I would also be nice to be able to collect these statistics in reports. I'm considering placing an broker on a publicly accesible server as a default Hermes provider for new users to experiment with and would rather it was not swamped :-) It could also be a good example of using SSL etc.
Ah I understand :)
Any pointers to where in the codebase this could be implemented would be very welcome.
It should be relatively easy to add an interceptor to the broker to do this kinda thing... http://incubator.apache.org/activemq/interceptors.html where you could overload the send() method and keep around counts for the messages/message sizes per connection/session/producer whatever you want. The only real question is what to do if a user exceeds their quota - close them? -- James ------- http://radio.weblogs.com/0112098/
