Purging used messages from the RabbitMQ database

Updated on December 9th, 2022

Depending on the requirements of the system in question (for example, the number of assets being ingested on a regular basis), the number of messages being generated may cause the RabbitMQ database to grow fairly rapidly in size and use large amounts of RAM. To ensure consumed messages are purged correctly, lazy queues can be set up from RabbitMQ's management dashboard.
From Curator 3.5.1 (with Curator Server 4.1.1.207 or newer)  the unused RabbitMQ queues have the 10 min retention policy already set up removing the need for manual changes to unused queues.

Please note that lazy queues should only be used on very busy systems since the footprint of 7 days' worth of messages will be insignificant in most cases.

NOTE: Lazy queues page messages to disk, so please ensure enough disk space is available to accommodate for this.

To set up lazy queues from the management dashboard:

  1. Go to http://localhost:15672/.
  2. Log in.
  3. Select the Admin tab.
  4. Fill in the Add/update a policy form as shown below:
  5. Navigate to the Queues tab and confirm each queue is marked with your new policy (see below):
  6. To change the message TTL (time to live), you will need to add a policy matching the below entry as well:
Was this article helpful?