gpt4 book ai didi

rabbitmq - RabbitMQ 中的磁盘空间问题

转载 作者:行者123 更新时间:2023-12-01 19:57:41 25 4
gpt4 key购买 nike

我是rabbitmq的新手。我尝试将 100 万条示例消息推送到我的队列中。

我已经在C盘安装了RabbitMQ。但是,在运行该进程时,由于 C 驱动器中的磁盘空间问题,该进程受到攻击,我清除了队列。

我的问题是,有没有办法更改消息的存储位置。

就我而言,我有 500 GB 的 D 驱动器,我想使用该驱动器。我怎样才能做到这一点。

我使用过Python客户端

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()

最佳答案

您应该定义环境变量。请参阅有关 File Locations 的 RabbitMQ 文档特别是 RABBITMQ_MNESIA_BASE 环境变量:

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.)

对于您的情况,类似于 RABBITMQ_MNESIA_BASE=d:\rabbitmq\db

关于rabbitmq - RabbitMQ 中的磁盘空间问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29598692/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com