Consumer Throttling

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Consumer Throttling

Nathan Woodhull
In our application we have a third party service that we are only
allowed to make requests to 10 times/per second. If we exceed the
10msgs/second throttle, we are charged a fine for breaking the
contractual agreement.

Our application generates requests in large spurts, so we would like
to use a queue to throttle the outgoing messages to the external
service to comply with the SLA. Is there a good way to do this through
RabbitMQ configuration? Doing this in the producer or consumer itself
does not seem like it is likely to work since they are both
distributed. Basically, we want to implement this pattern:

http://activemq.apache.org/camel/throttler.html

-Nathan

_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Consumer Throttling

Ben Hood
Nathan,

On Tue, Nov 25, 2008 at 1:11 AM, Nathan Woodhull <[hidden email]> wrote:

> In our application we have a third party service that we are only
> allowed to make requests to 10 times/per second. If we exceed the
> 10msgs/second throttle, we are charged a fine for breaking the
> contractual agreement.
>
> Our application generates requests in large spurts, so we would like
> to use a queue to throttle the outgoing messages to the external
> service to comply with the SLA. Is there a good way to do this through
> RabbitMQ configuration? Doing this in the producer or consumer itself
> does not seem like it is likely to work since they are both
> distributed. Basically, we want to implement this pattern:
>
> http://activemq.apache.org/camel/throttler.html

Off the top of my head I can't see how you can do this without
creating a custom queue implementation that implements this sliding
window check before delivering to a consumer.

Whilst this would probably be doable, it wouldn't be available in
Rabbit OOTB, i.e. you would have to try it with a patched version.

HTH,

Ben

_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Consumer Throttling

alphashuro
This post has NOT been accepted by the mailing list yet.
What would you suggest as a starting point for implementing a custom queue?
Loading...