- Mastering RabbitMQ
- Emrah Ayanoglu Yusuf Ayta? Dotan Nahum
- 496字
- 2021-07-23 14:52:50
The configuration file
The RabbitMQ environment variables mostly gives the control of location of files and directories, whereas the RabbitMQ configuration file gives the control of the engine, such as authentication, performance, memory limit, disc limit, exchanges, queues, bindings, and so on. The configuration
file is by default located in /etc/rabbitmq/rabbitmq.config
for Unix-based computers and $RABBITMQ_SERVER\etc\rabbitmq.config
for Windows-based computers, as discussed in the previous sections.
RabbitMQ has many configuration variables; however, we will discuss the most important ones here:
auth_mechanisms
: This is used to supports different types of authentication mechanisms. You can change the different type of authentication mechanism using this variable.default_user
: This is used as a default user to access the RabbitMQ server using the RabbitMQ client. Thedefault_user
variable simply defines the username of the default user.default_pass
: This is similar to thedefault_user
variable, as it simply defines the default user's password.default_permission
: This is similar todefault_user
anddefault_pass
. This variable describes the permissions of the default user.disk_free_limit
: This is used to controls the disk size for storing the messages into the disk. This variable defines the free disk size to give an alert to the RabbitMQ server administrator.heartbeat
: This is a configuration variable that indicates the time interval between beats. A beat is a packet sent from the broker to the client, and back so that the broker can understand whether a client is still connected or not and to keep a line open where some network equipment may cut it due to inactivity. In other protocols, such as the old and time-tested Internet Relay Chat (IRC), this trick was also known as ping-pong.hipe_compile
: As a default property, RabbitMQ is compiled with the default Erlang compiler; however, we can compile with the high performance Erlang compiler. RabbitMQ server is compiled at startup. Hipe compiling results in later start; however, Hipe Compile gives 20%-40% performance gain on message broker operations. Withhipe_compile
variable, we can control whether RabbitMQ will be compiled through high performance Erlang compiler or not.log_levels
: We have logs to control and trace the application for each of the software applications. Logs have different levels to show log messages according to its log level, that is, error, warning, and information. With this variable, you can decide on the log level.tcp_listeners
: This is the same as the server applications, such as FTP server, Mail server, and so on. The RabbitMQ server binds on the IP and port of the operating system. You can change its binding port and IP with thetcp_listeners
variable.ssl_listeners
: Whenever clients listen to the server with SSL, the RabbitMQ server uses a different IP and port. Thessl_listeners
variable just defines the IP and port of the SSL client connections.vm_memory_high_watermark
: Free memory size is reasonably important for the RabbitMQ server. RabbitMQ alerts the memory problem with the given free memory ratio invm_memory_high_watermark
.
The following table describes the most of the important variables with given default values:
Configuration Variables:

推薦閱讀
- Spring Boot開(kāi)發(fā)與測(cè)試實(shí)戰(zhàn)
- 企業(yè)級(jí)Java EE架構(gòu)設(shè)計(jì)精深實(shí)踐
- Python 深度學(xué)習(xí)
- TypeScript項(xiàng)目開(kāi)發(fā)實(shí)戰(zhàn)
- C#程序設(shè)計(jì)基礎(chǔ):教程、實(shí)驗(yàn)、習(xí)題
- Java實(shí)戰(zhàn)(第2版)
- Scratch3.0趣味編程動(dòng)手玩:比賽訓(xùn)練營(yíng)
- ArcPy and ArcGIS(Second Edition)
- JavaScript Unit Testing
- Processing開(kāi)發(fā)實(shí)戰(zhàn)
- PHP 7 Programming Blueprints
- Practical Responsive Typography
- JavaScript設(shè)計(jì)模式與開(kāi)發(fā)實(shí)踐
- Learning Ext JS(Fourth Edition)
- Hadoop MapReduce v2 Cookbook(Second Edition)