[rabbitmq-discuss] Throttling when Fast Producer, Slow Consumer
jerryk at vmware.com
Wed Mar 14 15:05:03 GMT 2012
> In re use of the HTTP API: Jerry, I completely agree that such an
> approach, while tempting, really does violate the "information hiding"
> aspect of decoupled producers and consumers. That said, can you say
> more about how you understand the difference between "monitoring the
> system" and using the HTTP API to "keep a track on the queue depths?"
Sure. In production, one presumably wants to have some kind of
monitoring or alerting system to provide health checks on important
parts of the infrastructure. Using the RabbitMQ management HTTP API,
it's easy to write scripts that will integrate into Hyperic, or
Splunk, or the like, and keep track of things like broker resource
usage. One is also wise to make the monitoring system aware of the
queues in your application so that unexpected situations like slow or
failed consumers can be caught and remedied in a timely fashion.
> In re mismatched rates of production/consumption: Emile, no this is
> not a permanent feature. I consider it a pathological and anomalous
> state. But it may happen. What is your recommended way for a producer
> who is writing to an exchange to monitor the length of a queue on "the
> other side" of the exchange?
There are some nice examples using the HTTP API in the book "RabbitMQ
in Action," currently available in pre-release from Manning, with the
print release to follow very soon. This page provides a quick
summary, although the book elaborates on this quite a bit and includes
some nice example monitoring scripts and notes on integrating with Nagios:
More information about the rabbitmq-discuss