RabbitMQ delayed exchange plugin loads and resources

731 views Asked by At

We are using rabbitmq (3.6.6) to send analysis (millions) to different analyzers. These are very quick and we were planning on use the rabbit-message-plugin to schedule monitorizations over the analyzed elements.

We were thinking about rabbitmq-delayed-exchange-plugin, already made some tests and we need some clarification.

Currently:

  • We are scheduling millions of messages
  • Delays range from a few minutes to 24 hours
  • As previously said, these are tests, so we are using a machine with one core and 4G of RAM which has also other apps running on it.

What happened with a high memory watermark set up at 2.0G:

  • RabbitMQ eventually (a day or so) starts consuming 100% (only one core) and does not respond to the management interface nor rabbitmqctl. This goes on for at least 18 hours (always end up killing, deleting mnesia delayed file on disk - about 100 / 200 MB - and restarting).

What happened with a high memory watermark set up at 3.6G:

  • RabbitMQ was killed by kernel, because of high memory usage (4 GB hardware) about a week after working like this.
  • Mnesia file for delayed exchange is about 1.5G
  • RabbitMQ cannot start anymore giving to the below trace (we are assuming that because of being terminated by a KILL messages in the delay somehow ended up corrupted or something

    {could_not_start,rabbit,
    rabbitmq-server[12889]: {{case_clause,{timeout,['rabbit_delayed_messagerabbit@rabbitNode']}},
    rabbitmq-server[12889]: [{rabbit_boot_steps,'-run_step/2-lc$^1/1-1-',1,
    

And right now we are asking ourselves: Are we a little over our heads using rabbit delayed exchange plugin for this volumes of information? If we are, then end of the problem, rethink and restart, but if not, what could be an appropiate hardware and/or configuration setup?

1

There are 1 answers

2
Gabriele Santomaggio On BEST ANSWER

RabbitMQ delayed exchange plugin is not properly designed to store millions of messages.

It is also documented to the plugin page

Current design of this plugin doesn't really fit scenarios with a high number of delayed messages (e.g. 100s of thousands or millions). See 72 for details.

Read also here: https://github.com/rabbitmq/rabbitmq-delayed-message-exchange/issues/72

This plugin is often used as if RabbitMQ was a database. It is not.