O'Reilly logo

RabbitMQ Cookbook by Sigismondo Boschi, Gabriele Santomaggio

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

What to do when RabbitMQ fails to restart

Occasionally, RabbitMQ fails to restart. This can be an important issue in case the broker contains persistent data; otherwise, it's enough to reset the broker persistent state.

Getting ready

To run this recipe, you just need a test RabbitMQ broker.

Note

We are going to destroy all the previously defined data—avoid using a production instance.

How to do it...

To clean-up RabbitMQ, it's enough to follow these simple steps:

  1. Stop RabbitMQ if it is running.
  2. Locate the Mnesia database directory. By default, it's /var/lib/rabbitmq/mnesia (Linux) or %APPDATA%\RabbitMQ\db (Windows).
  3. Delete it recursively.
  4. Restart RabbitMQ.

How it works...

The Mnesia database contains all the runtime definitions of RabbitMQ: queues, exchanges, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required