RabbitMQ có hai cơ chế backpressure độc lập:
- Memory watermark (mặc định 40% RAM): khi đạt ngưỡng, broker dừng nhận publish mới và block connection.
- Disk free space alarm (mặc định 50MB free): khi disk sắp đầy, broker cũng block publishing — độc lập với memory
Cả hai đều có thể block producer đồng thời.
Producer bị block sẽ gặp timeout, nên cần monitor queue depth và consumer lag để phòng ngừa.
Giải pháp: thêm consumer, tối ưu throughput consumer, hoặc tăng memory/disk broker.
RabbitMQ has two independent backpressure mechanisms:
- Memory watermark (default 40% RAM): when reached, the broker stops accepting publishes and blocks producer connections.
- Disk free space alarm (default 50MB free): when disk is nearly full, publishing is also blocked — independently of memory
Both can block producers simultaneously.
Blocked publishers experience timeouts, so monitor queue depth and consumer lag.
Solutions: add consumers, optimize throughput, or increase broker memory/disk.