11.部署指南

予早 2025-02-21 01:08:23
Categories: Tags:

https://www.rabbitmq.com/docs/production-checklist

https://emacsist.github.io/2017/05/15/%E7%BF%BB%E8%AF%91rabbitmq-%E7%94%9F%E4%BA%A7%E7%8E%AF%E5%A2%83%E6%A3%80%E6%9F%A5%E5%88%97%E8%A1%A8/

存储方式

资源限制

内存

By default, RabbitMQ will not accept any new messages when it detects that it’s using more than 40% of the available memory (as reported by the OS)

建议

磁盘

磁盘剩余空间限制disk_free_limit默认值为50M,仅适用于开发环境。

建议

文件句柄

至少50k

安全相关

虚拟主机

单租户可以使用默认虚拟主机/,多租户需要分离

用户

生产环境删除默认用户guest

Resource Alarms

When a resource alarm is in effect, all connections that publish will be blocked until the alarm clears. Clients can opt-in to receive a notification when they are blocked. Learn more in the Resource Alarms guide.

Temporarily Blocking Publishing

It is possible to effectively block all publishing in a cluster by setting the memory high watermark to 0, thus making a resource alarm to go off immediately:

Plain Text rabbitmqctl set_vm_memory_high_watermark 0 

Blocked and Unblocked Connection Notification

channel.queuebind:把目的队列绑定到来源交换机 channel.exchangebind:把目的交换机绑定到来源交换机