[rabbitmq-discuss] Disable writing to disk

Emile Joubert emile at rabbitmq.com
Tue May 14 16:44:10 BST 2013

Hi Matthias,

On 14/05/13 16:23, Matthias Reik wrote:
> we have been using RabbitMQ for quite a while and are happy users of it, 
> but now we got a new requirement to not write, the messages that are 
> coming through a specific queue, to disk.
> Does RabbitMQ support such a use case?

Not at the moment.

> One alternative would of course be to create a RamDisk and write the 
> content to that one, but it was clear from this article
> http://www.rabbitmq.com/blog/2011/01/20/rabbitmq-backing-stores-databases-and-disks/
> that this is not a good solution (even though it might be a solution for 
> us).

A RAM-disk will guarantee that messages don't reach secondary storage,
but I agree this is not a satisfactory solution. It will also affect all
the queues, while you may need finer control.

An alternative option would be to set the vm_memory_high_watermark to a
very large factor (e.g. 100). The broker will then behave as if it had
alot more memory than it really has (and therefore it runs the risk of
crashing with an out-of-memory error). At the moment the broker may
start sending messages to disk when as little as 5% of RAM is in use.
Setting the vm_memory_high_watermark high enough that this threshold is
never reached should avoid disk writes.

Can you explain why you want to avoid messages in disk? We have been
asked about this feature before, but the request has never been
accompanied by a strong motivating argument.


More information about the rabbitmq-discuss mailing list