RabbitMQ vhost 配置

RabbitMQ vhost 配置

rabbitmqctl set_vhost_limits是用來定義虛擬主機限制的命令併發

配置最大鏈接限制

要限制vhost vhost_name中併發客戶端鏈接的 總數,請使用如下限制定義:code

rabbitmqctl set_vhost_limits -p vhost_name'{「max-connections」:256}'

要禁用到虛擬主機的客戶端鏈接,請將限制設置爲零:rabbitmq

rabbitmqctl set_vhost_limits -p vhost_name'{「max-connections」:0}'

要解除限制,請將其設置爲負值:隊列

rabbitmqctl set_vhost_limits -p vhost_name'{「max-connections」:-1}'

配置最大隊列數

要限制vhost vhost_name中的隊列 總數,請使用如下限制定義:it

rabbitmqctl set_vhost_limits -p vhost_name'{「max-queues」:1024}'

要解除限制,請將其設置爲負值:io

rabbitmqctl set_vhost_limits -p vhost_name'{「max-queues」:-1}'
相關文章
相關標籤/搜索