python,rabbitmq,pika

正常情况下不许要修改任何配置

三种方式可以修改rabbitmq配置

以下两个配置文件需要自己创建

1环境变量的配置文件 rabbitmq-env.conf  可以配置ports, file locations and names 位置固定不可修改

创建路径/etc/rabbitmq

RABBITMQ_NODE_IP_ADDRESS:网络接口,空代表任何接口

RABBITMQ_NODE_PORT:5672(缺省)

RABBITMQ_NODENAME:rabbit@$HOSTNAME(缺省)

RABBITMQ_CONSOLE_LOG:将控制台输出输出到%RABBITMQ_SERVICENAME%.debug ,位置在RABBITMQ_BASE,可以设置参数为new每次新建一个输出文件,reuse输出置同一个文件

RABBITMQ_CTL_ERL_ARGS:只有在debug模式下有意义

RABBITMQ_SERVER_START_ARGS:

2配置信息的配置文件 rabbitmq.config

创建路径存储在rabbitmq-env.conf的RABBITMQ_CONFIG_FILE=  条目下

可以配置访问权限 , 限制 and clusters, and also plugin settings.

可以设置RabbitMQ core application, Erlang services and RabbitMQ plugins

配置模式参见:

http://www.erlang.org/doc/man/config.html

形如:

[    {mnesia, [{dump_log_write_threshold, 1000}]},    {rabbit, [{tcp_listeners, [5673]}]}  ].

主要参数:

tcp_listeners {"127.0.0.1",              5672}

Default: [5672]

ssl_listenersSSL connections.              

Default: []

ssl_optionsSSL配置    

Default: []

vm_memory_high_watermarkSee  the memory-based flow control documentation.              

Default: 0.4

vm_memory_high_watermark_paging_ratio设置当超过一定系数后将内存写入到文件中           See the memory-based flow control documentation.              

Default: 0.5

disk_free_limit  memory-based flow control
log_levels 设置log等级,不同等级会选择保存warn,error,info等信息
frame_max  设置帧的最大容量,大的值会提升性能,小的值会导致延时

Default: 131072

heartbeat 测试客户端是否还在链接,不设置会提升性能

Default: 580

default_vhostVirtual host

Default: <<"/">>

default_user缺省用户            

Default: <<"guest">>

default_pass密码            

Default: <<"guest">>

default_user_tags用户标签            

Default: [administrator]

default_permissionsPermissions to assign to the default user when creating it.              

Default:                  [<<".*">>, <<".*">>, <<".*">>]              

cluster_nodes

Set this to cause clustering  to happen automatically              when a node starts for the very first time. The first element of  

           the tuple is the nodes that the node will try to cluster to. The  second element is either disc or ram and determines the node type.              

Default: {[], disc}

server_properties发布给客户端的key-value对              

Default: []

collect_statistics

设置信息收集等级用于rmqadmin插件

You probably don't want to change this yourself.              

Default: none

collect_statistics_interval 信息收集时间间隔ms            

Default: 5000

auth_mechanismsSASL authentication              mechanisms to offer to clients.              

Default: ['PLAIN', 'AMQPLAIN']

auth_backends

             List of authentication databases to use. Other databases              than rabbit_auth_backend_internal are  

          available through plugins.              

Default: [rabbit_auth_backend_internal]

reverse_dns_lookups

true 是rmq进行DNS反向查找        

Default: false

delegate_count集群内部交换信息进程数

part of a cluster, you may  wish to increase this value.              

Default: 16

trace_vhosts  不要改变

Default: []

tcp_listen_optionsDefault socket options. You probably don't want to  change this.              

Default:                

[binary, {packet,        raw},
         {reuseaddr,     true},
         {backlog,       128},
         {nodelay,       true},
         {exit_on_close, false}]
hipe_compile 设置为true可以提高性能20%~50%

Ubuntu users will need to install the erlang-base-hipe package.              

           

Default: false

cluster_partition_handling

             How to handle network partitions. One              of ignore,              pause_minority              or autoheal. See          

  the documentation              on partitions for more information.              

Default: ignore

msg_store_index_moduleImplementation module for queue indexing. You probably              don't want to change this.              

Default: rabbit_msg_store_ets_index

backing_queue_moduleImplementation module for queue contents. You probably              don't want to change this.              

Default: rabbit_variable_queue

msg_store_file_size_limitTunable value for the persister. You almost certainly              should not change this.              

Default: 16777216

queue_index_max_journal_entriesTunable value for the persister. You almost certainly              should not change this.              

Default: 65536

3控制台参数配置

http://www.rabbitmq.com/configure.html#configuration-file