RabbitMQ(四)
RabbitMQ 配置
一、RabbitMQ 配置修改方式
1、修改环境变量
2、修改配置文件(只介绍这个)
3、修改运行时参数和政策
locate rabbitmq

vi /var/log/rabbitmq/rabbit@10-10-43-207.log-20160918

说明我尚未添加配置文件,采用的默认配置启动的 RabbitMQ
还有一个地方可以看到有无添加配置文件(rabbitmq_management,见下图)

二、配置项
| Key | Documentation |
|---|---|
| tcp_listeners | List of ports on which to listen for AMQP connections (without SSL). Can contain integers (meaning "listen on all interfaces") or tuples such as {"127.0.0.1", 5672} to listen on one or more interfaces.
Default: [5672] |
| num_tcp_acceptors | Number of Erlang processes that will accept connections for the TCP listeners.
Default: 10 |
| handshake_timeout | Maximum time for AMQP 0-8/0-9/0-9-1 handshake (after socket connection and SSL handshake), in milliseconds.
Default: 10000 |
| ssl_listeners | As above, for SSL connections.
Default: [] |
| num_ssl_acceptors | Number of Erlang processes that will accept connections for the SSL listeners.
Default: 1 |
| ssl_options | SSL configuration. See the SSL documentation.
Default: [] |
| ssl_handshake_timeout | SSL handshake timeout, in milliseconds.
Default: 5000 |
| vm_memory_high_watermark | Memory threshold at which the flow control is triggered. See the memory-based flow control documentation.
Default: 0.4 |
| vm_memory_high_watermark_paging_ratio | Fraction of the high watermark limit at which queues start to page messages out to disc to free up memory. See thememory-based flow control documentation.
Default: 0.5 |
| disk_free_limit | Disk free space limit of the partition on which RabbitMQ is storing data. When available disk space falls below this limit, flow control is triggered. The value may be set relative to the total amount of RAM (e.g.{mem_relative, 1.0}). The value may also be set to an integer number of bytes. Or, alternatively, in information units (e.g "50MB"). By default free disk space must exceed 50MB. See the Disk Alarms documentation.
Default: 50000000 |
| log_levels | Controls the granularity of logging. The value is a list of log event category and log level pairs.
The level can be one of 'none' (no events are logged), 'error' (only errors are logged), 'warning' (only errors and warning are logged), 'info' (errors, warnings and informational messages are logged), or 'debug' (errors, warnings, informational messages and debugging messages are logged). At present there are four categories defined. Other, currently uncategorised, events are always logged. The categories are:
Default: [{connection, info}] |
| frame_max | Maximum permissible size of a frame (in bytes) to negotiate with clients. Setting to 0 means "unlimited" but will trigger a bug in some QPid clients. Setting a larger value may improve throughput; setting a smaller value may improve latency.
Default: 131072 |
| channel_max | Maximum permissible number of channels to negotiate with clients. Setting to 0 means "unlimited". Using more channels increases memory footprint of the broker.
Default: 0 |
| channel_operation_timeout | Channel operation timeout in milliseconds (used internally, not directly exposed to clients due to messaging protocol differences and limitations).
Default: 15000 |
| heartbeat | Value representing the heartbeat delay, in seconds, that the server sends in the connection.tune frame. If set to 0, heartbeats are disabled. Clients might not follow the server suggestion, see the AMQP reference for more details. Disabling heartbeats might improve performance in situations with a great number of connections, but might lead to connections dropping in the presence of network devices that close inactive connections.
Default: 60 (580 prior to release 3.5.5) |
| default_vhost | Virtual host to create when RabbitMQ creates a new database from scratch. The exchange amq.rabbitmq.logwill exist in this virtual host.
Default: <<"/">> |
| default_user | User name to create when RabbitMQ creates a new database from scratch.
Default: <<"guest">> |
| default_pass | Password for the default user.
Default: <<"guest">> |
| default_user_tags | Tags for the default user.
Default: [administrator] |
| default_permissions | Permissions to assign to the default user when creating it.
Default: [<<".*">>, <<".*">>, <<".*">>] |
| loopback_users | List of users which are only permitted to connect to the broker via a loopback interface (i.e. localhost).
If you wish to allow the default guest user to connect remotely, you need to change this to []. Default: [<<"guest">>] |
| 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 | List of key-value pairs to announce to clients on connection.
Default: [] |
| collect_statistics | Statistics collection mode. Primarily relevant for the management plugin. Options are:
You probably don't want to change this yourself. Default: none |
| collect_statistics_interval | Statistics collection interval in milliseconds. Primarily relevant for the management plugin.
Default: 5000 |
| auth_mechanisms | SASL authentication mechanisms to offer to clients.
Default: ['PLAIN', 'AMQPLAIN'] |
| auth_backends |
List of authentication / authorisation backends to use. This list can contain names of modules (in which case the same module is used for both authentication and authorisation), or 2-tuples like {ModN, ModZ} in which caseModN is used for authentication and ModZ is used for authorisation. In the 2-tuple case, ModZ can be replaced by a list, all the elements of which must confirm each authorisation query, e.g. {ModN, [ModZ1, ModZ2]}. This allows authorisation plugins to mix-in and provide additional security constraints. Other databases than rabbit_auth_backend_internal are available through plugins. Default: [rabbit_auth_backend_internal] |
| reverse_dns_lookups | Set to true to have RabbitMQ perform a reverse DNS lookup on client connections, and present that information through rabbitmqctl and the management plugin.
Default: false |
| delegate_count | Number of delegate processes to use for intra-cluster communication. On a machine which has a very large number of cores and is also part of a cluster, you may wish to increase this value.
Default: 16 |
| trace_vhosts | Used internally by the tracer. You shouldn't change this.
Default: [] |
| tcp_listen_options | Default socket options. You probably don't want to change this.
Default: [{backlog, 128},
|
| hipe_compile | Set to true to precompile parts of RabbitMQ with HiPE, a just-in-time compiler for Erlang. This will increase server throughput at the cost of increased startup time.
You might see 20-50% better performance at the cost of a few minutes delay at startup. These figures are highly workload- and hardware-dependent. HiPE support may not be compiled into your Erlang installation. If it is not, enabling this option will just cause a warning message to be displayed and startup will proceed as normal. For example, Debian / Ubuntu users will need to install the erlang-base-hipe package. HiPE is not available at all on some platforms, notably including Windows. HiPE has known issues in Erlang/OTP versions prior to 17.5. Using a recent Erlang/OTP version is highly recommended for HiPE. Default: false |
| cluster_partition_handling | How to handle network partitions. Available modes are:
See the documentation on partitions for more information. Default: ignore |
| cluster_keepalive_interval | How frequently nodes should send keepalive messages to other nodes (in milliseconds). Note that this is not the same thing as net_ticktime; missed keepalive messages will not cause nodes to be considered down.
Default: 10000 |
| queue_index_embed_msgs_below | Size in bytes of message below which messages will be embedded directly in the queue index. You are advised to read the persister tuning documentation before changing this.
Default: 4096 |
| msg_store_index_module | Implementation module for queue indexing. You are advised to read the persister tuning documentation before changing this.
Default: rabbit_msg_store_ets_index |
| backing_queue_module | Implementation module for queue contents. You probably don't want to change this.
Default: rabbit_variable_queue |
| msg_store_file_size_limit | Tunable value for the persister. You almost certainly should not change this.
Default: 16777216 |
| mnesia_table_loading_timeout | Timeout used when waiting for Mnesia tables in a cluster to become available.
Default: 30000 |
| queue_index_max_ journal_entries | Tunable value for the persister. You almost certainly should not change this.
Default: 65536 |
| queue_master_locator | Queue master location strategy. Available strategies are:
See the documentation on queue master location for more information. Default: <<"client-local">> |
RabbitMQ(四)的更多相关文章
- RabbitMQ(四):RPC的实现
原文:RabbitMQ(四):RPC的实现 一.RPC RPC(Remote Procedure Call)—远程过程调用,它是一种通过网络从远程计算机程序上请求服务,而不需要了解底层网络技术的协议. ...
- 【RabbitMQ学习之二】RabbitMQ四种交换机模式应用
环境 win7 rabbitmq-server-3.7.17 Erlang 22.1 一.概念1.队列队列用于临时存储消息和转发消息.队列类型有两种,即时队列和延时队列. 即时队列:队列中的消息会被立 ...
- RabbitMQ四种交换机类型介绍
RabbitMQ 原文地址: https://baijiahao.baidu.com/s?id=1577456875919174629&wfr=spider&for=pc 最新版本的 ...
- RabbitMQ 四种Exchange
AMQP协议中的核心思想就是生产者和消费者隔离,生产者从不直接将消息发送给队列.生产者通常不知道是否一个消息会被发送到队列中,只是将消息发送到一个交换机.先由Exchange来接收,然后Exchang ...
- RabbitMQ ——四种ExChange及完整示例
RabbitMQ常用的Exchange Type有fanout.direct.topic.headers这四种,下面分别进行介绍. 这四种类的exchange分别有以下一些属性,分别是: name:名 ...
- RabbitMQ(四): rabbitmq 的消息确认机制(事务+confirm)
在 rabbitmq 中我们可以通过持久化数据解决 rabbitmq 服务器异常的数据丢失问题. 问题:生产者将消息发送出去之后,消息到底有没有到达 rabbitmq 服务器.默认情况下是不知道的. ...
- 深入学习RabbitMQ(四):channel的confirm模式
转自:http://m.blog.csdn.net/article/details?id=54340711 上一篇博客我们介绍了使用RabbitMQ可能会遇到的一个问题,即生产者不知道消息是否真正到达 ...
- RabbitMQ (四) 工作队列之公平分发
上篇文章讲的轮询分发 : 1个队列,无论多少个消费者,无论消费者处理消息的耗时长短,大家消费的数量都一样. 而公平分发,又叫 : 能者多劳,顾名思义,处理得越快,消费得越多. 生产者 public c ...
- 快速掌握RabbitMQ(四)——两种消费模式和QOS的C#实现
本篇介绍一下RabbitMQ中的消费模式,在前边的所有栗子中我们采用的消费者都是EventingBasicConsumer,其实RabbitMQ中还有其他两种消费模式:BasicGet和QueueBa ...
- RabbitMq四种模式介绍和授权
rabbitmqctl change_password admin admin123 修改admin密码 界面管理和授权操作 1新增用户 rabbitmqctl add_user admin amin ...
随机推荐
- iOS AppStore提交错误收集
ERROR ITMS-90535: "Unexpected CFBundleExecutable Key. The bundle at 'Payload/创可贴.app/TencentOpe ...
- Windows 下安装cryptography-1.6
由于proxy限制不能使用pip install cryptography命令安装cryptography,所以安装这个python库折腾了一天多的时间,差点就怀疑人生了,好在柳暗花明,惊喜出现了.下 ...
- ubuntu12.04静态ip设置问题
由于linux知识不是学的很深,所以仅代表我自己的设置成功总结. 第一步是设置/etc/network/interfaces 增加静态ip设置 auto eth0iface eth0 inet sta ...
- VS大视野
vs的本质:他是微软公司的员工一起开发的一个项目: 既然是项目:那么就是用编程语言编出来的! 用的是C# C#有他的特点:继承,封装,多态!等 我们在使用vs的时候,为什么可以使用很多的里面已经存在的 ...
- leetcode 179. Largest Number 求最大组合数 ---------- java
Given a list of non negative integers, arrange them such that they form the largest number. For exam ...
- 采集数据和memchche的存储使用,分页展示
<?phpheader('content-type:text/html;charset=utf-8');//实例化memcache$mem=new Memcache();//链接$mem-> ...
- DFS序详解
dfs序就是一棵树在dfs遍历时组成的节点序列. 它有这样一个特点:一棵子树的dfs序是一个区间. 下面是dfs序的基本代码: void dfs(int x,int pre,int d){//L,R表 ...
- 初学Laravel
之前一直用开tp和ot,本来觉得学会一个tp便可走遍天下,tp的确强大.但后来听到很多同行的同学说他们的公司都开始转型往lv走了,我的同学没有学过lv,然而公司给足时间去让他们去学.当然,缺人可能是占 ...
- 关于VS2010无法编译问题
cvtres.exe 近来遇到无法编译问题,编译后debug之类文件全部为空,纠结好久才发现还是一个以前遇到解决过的问题...= = C:\Windows\Microsoft.NET\Framewor ...
- C++命名空间问题
名称空间支持是一项c++特性,是用来解决在编写大型程序中不同文件(厂商)中相同变量名问题. 例如:有两个已经封装好的产品(类)中同时包含一个名为wanda()的函数,为了能够准确调用其中一个wand ...