RabbitMQ Configuration

rabbitmq提供三种方式来定制化server

1、environment variables:定义端口、文件路径、服务名称等,可以使用shell和rabbitmq-env.conf定义; 
2、configuration file:定义权限、集群、插件等,可以使用rabbitmq.config配置; 
3、runtime parameters :运行时参数,如集群设置等; 
大多数设置使用第一、二中设置;

config file location

verify configuration(how to find config file location) 
the active configuration file can be verified by inspecting rabbitmq log file,it will show up in the log file at the top.

Customize Rabbitmq Environment(unix) 
You can creat/edit rabbitmq-env.conf to define enviroment variables. Its location is configurable using the RABBITMQ_CONF_EVN_FILE environment variable. 
You can use the standard variable names but drop the RABBITMQ_ prefix in rabbitmq-env.conf.

RabbitMQ Environment Variables 
RabbitMQ environment variable names have the prefix RABBITMQ_ . A typical variable called RABBTIMQ_variable_name is set as follows: 
a shell environment variable called RABBITMQ_variable_name is used if this is defined; 
otherwise, a variable called variable_name is used if this is set in the rabbitmq-env.conf; 
otherwise, a system-specified default value is used.

namedefaultdescription
RABBITMQ_NODE_PORT5672 
RABBITMQ_DIST_PORTRABBITMQ_NODE_PORT+20000Port used for inter-node and CLI tool communition
RABBITMQ_NODENAMEUNIX:rabbit@$HOSTNAMEthe node name must be unique per erlang-node-and-machine
RABBITMQ_CONF_ENV_FILEUNIX:$RABBITMQ_HOME/etc/rabbitmq/rabbitmq-env.confPort used for inter-node and CLI tool communition
RABBITMQ_CONFIG_FILE/etc/rabbitmq/rabbitmqthe rabbitmq.config file location,erlang 在运行时会自动添加.config后缀到这个变量值后面

Configuration File

该配置文件运行自定义rabbitmq的server,erlang,plugins,文件格式是一个标准的erlang配置文件格式,rabbitmq server源文件有一个配置文件实例,名称为:rabbitmq.config.example

namedefaultdescription
tcp_listener[5672]List of ports which to listen for AMQP connections,Can contain integers or tuples.
num_tcp_acceptors10The number of erlang process that will accept connetions for the tcp listeners.
channel_max0Maximum permissible number of channels to negotiate clients,setting to 0 means unlimited.
heartbeat60Value representing the heartbeat delay,in seconds.
default_vhost/Virtual host to create when RabbitMQ create a new database.
default_userguest 
default_passguest 
default_permissions[<<".*">>, <<".*">>, <<".*">>]Permissions to assign to the default user when creating it.
loopback_users[<<"guest">>]List of users which are only permitted to connect the broker via a loopback interface.
queue_master_locatorclient-localqueue master location strategy. Avaliable strategies are:
min-masters
client-local
random

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值