Skip to main content
InterviewHubPRO
Section Overview
Q18

Question 18 of 50

Part 2: Core Architecture & Implementation (Mid-Level)

36%
RabbitMQ & AMQP (50 Qs)•Part 2: Core Architecture & Implementation (Mid-Level)

What is RabbitMQ Flow Control and Memory/Disk Alarms?

senior LevelSystem DesignRabbitMQMicroservices

In Simple Words: If producers publish messages faster than consumers can process them, or if consumers disconnect, broker RAM and disk usage will skyrocket. To prevent out-of-memory kernel crashes:

  1. Memory High Watermark Alarm (vm_memory_high_watermark):
    • Defaults to 40% of available RAM.
    • When exceeded, RabbitMQ blocks all incoming connections from publishing (puts them in a TCP freeze).
  2. Disk Free Space Alarm (disk_free_limit):
    • When free disk space falls below the limit (default 50MB), publishing is blocked cluster-wide until disk space is freed.
  3. Once memory/disk levels normalize, publishers are automatically unblocked.