Add the Windows RabbitMQ profile

Online use RabbitMQ version 3.6.X, because some issues need to modify the configuration file, the old rules, the first line under verification by then on the front!

View RabbitMQ test environment management interface. . . Tips not found ...

To this directory, found a rabbitmq.config.example, we can copy a file rabbitmq.config.example modified to rabbitmq.config

Note: this time if restarting Windows services, find or not find the file, you need to re-register a:

Note that an administrator needs to run rabbitmq command prompt or the command prompt, cd to the directory, as shown:

 

The following 4-step operation

(1) rabbitmq-service stop out of service

(2) rabbitmq-service remove remove services

(3) rabbitmq-service install by service

(4) rabbitmq-service start to start the service

View management interface, configuration files found!

 

 -------------------------------------------------- ----------------Dividing line-------------------------------- -------------------------------------------------- ---

We verify configuration changes, give chestnuts:

channel_max default is no limit. . . (Of course, there is a maximum value)

We assume that this time is set to 128 by default, save it for later, run the program, see if you can work

 

Look at the effect of the configuration does not take effect. . .

Try again next restart service, embarrassed by this time, I encountered error:

 

 Analysis: We changed a configuration item, is it make mistakes, change it back, and then start one! ! !

 Nima. . . Woke up. . . Are we wrong to change it. . .

research! ! !

rabbitmq.conf文件
配置文件rabbitmq.conf允许RabbitMQ Server和插件被配置,从3.7.0开始,格式变成了sysctl format,语法可以简明的用3行解释:
1.所有你知道的一个单独配置都在一行
2.行的结构是 Key=Value
3.任何以#开始的行都是注释
下面是一个极简的例子:
 

 


示例会修改Rabbit MQ的监听端口从5672到5673.
为了重载Rabbit MQ配置文件路径,可以使用RABBITMQ_CONFIG_FILE环境变量。
注意:这个配置文件跟rabbitmq-env.conf是不同的,rabbitmq-env.conf在非windows系统下可以用来设置环境变量。
RabbitMQ服务器源库中包含了一个示例文件rabbitmq.conf.example,它包含了你可能希望需要设置的大多数配置条目(省略了一些模糊的配置)以及文档。

 这是我进公司刚学RabbitMQ的时候整理的,看格式,example的明显不对啊。。。怎么用的是新格式,应该是旧的Erlang配置格式才对啊。。。

但是官网带的不应该不对才对啊。。。仔细瞅瞅

我去。。。大概明白了。。。每个项目不光去掉注释,还要去掉最后一个的逗号。。。。

再重启。。。

成功!!!!奥耶。。。。

再试试配置生效没。。。

跑一下测试程序。。。

啊哈,生效了。。。。

总结:知道如何改和具体动手去改,可能查了十万八千里。。。

 

Guess you like

Origin www.cnblogs.com/niuge/p/11202985.html