0

In one of our applications the back pressure did not work and there was a huge pileup in a queue on RabbitMQ. This caused the RMQ node to choke.

Is there a way to apply flow control (manually) on that queue in such cases? That would have slowed down the producer and given us headroom.

anindyaju99
  • 465
  • 1
  • 5
  • 16

1 Answers1

1

In your case the consumers are not fast enough to handle the messages. Basically you had a load-spike.

So, it does not mean that you need to stop the publishers.

You could:

  1. Increase the number of the consumers
  2. Use the Lazy queues

you didn't see the flow control because RabbitMQ could handle the messages.

Gabriele Santomaggio
  • 21,656
  • 4
  • 52
  • 52
  • you may also want to look at the management & monitoring add-ons with things like nagios, etc. https://www.rabbitmq.com/how.html#management you may be able to automate increase / decrease of consumers, etc, using these types of tools. i have no experience w/ this off-hand, but it should be possible. – Derick Bailey Aug 03 '16 at 15:53
  • @Gabriele I guess consumer in this case means my application and not something internal to RMQ? Though flow control was not applied, RMQ was clearly not fine. CPU usage spiked upto 100% (on a 8 core, 32 GB machine). As per my understanding RMQ applies flow control in case memory usage is close to watermark. We were far from it. Adding more application consumers increases the load on RMQ and chokes it faster. – anindyaju99 Aug 05 '16 at 04:10