backtrack
backtrack

Reputation: 8144

Disk space issue in RabbitMQ

i am new to rabbitmq. I tried to push 1 million sample message into my queue.

I have installed RabbitMQ on C drive. But while running the process due to the disk space issue in C drive the process got struck and i purged the queue.

My question is, Is there a way to change the location where the message to be stored.

In my case i have 500 GB of D drive and i want to use that drive. How can i do this.

I have used Python client

for i in range (0,1000000):

channel.queue_declare(queue='hello')

channel.basic_publish(exchange='',
                      routing_key='hello',
                      body='Hello World!')
print " [x] Sent 'Hello World!'"


connection.close()

Upvotes: 2

Views: 6214

Answers (1)

Nicolas Labrot
Nicolas Labrot

Reputation: 4106

You should define environment variables. See the RabbitMQ documentation about File Locations and especialy RABBITMQ_MNESIA_BASE environment variable:

This base directory contains sub-directories for the RabbitMQ server's Mnesia database files, one for each node, unless RABBITMQ_MNESIA_DIR is set explicitly. (In addition to Mnesia files this location also contains message storage and index files as well as schema and cluster details.)

for you case something like RABBITMQ_MNESIA_BASE=d:\rabbitmq\db

Upvotes: 5

Related Questions