I have RabbitMQ server in cluster (2 nodes). All queues are durable, mirrored and all messagess are set as persistent.
I wrote application to synchronize database changes over RabbitMQ queues.
In most cases queue is empty because consumer can read changes as fast as producer can produce it.
Unfortunately on initial synchronization (when all rows from all tables are transfered) there are lot of messages in queue (10GB for example) waiting to be consumed because reading data from database is in most cases faster than writing. I thought these messagess will be saved to disk but it seems that all messages are stored also in RAM. So after while all RAM is used (no matter how much do I have) and it starts to block publishers.
Do anyone knows why RabbitMQ keeps all durable&persistent messages also in RAM? Is it "by design" feature?
I tried to use different message sizes (from 512kB to 5MB). Result was the same. Also having consumer connected / not connected or setting different QOS to it doesn't make any difference.
Versions: RabbitMQ 3.1.0, Erlang R14B04