官术网_书友最值得收藏!

  • 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. The default_user variable simply defines the username of the default user.
  • default_pass: This is similar to the default_user variable, as it simply defines the default user's password.
  • default_permission: This is similar to default_user and default_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. With hipe_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 the tcp_listeners variable.
  • ssl_listeners: Whenever clients listen to the server with SSL, the RabbitMQ server uses a different IP and port. The ssl_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 in vm_memory_high_watermark.

The following table describes the most of the important variables with given default values:

Configuration Variables:

主站蜘蛛池模板: 和田市| 竹山县| 榆树市| 宁夏| 台中市| 广南县| 铜陵市| 大埔区| 吉林市| 高青县| 修文县| 平陆县| 石城县| 罗江县| 镇坪县| 阳曲县| 遂川县| 开平市| 大同市| 东乌珠穆沁旗| 广汉市| 怀化市| 宜川县| 无锡市| 海城市| 托里县| 宝鸡市| 鹿邑县| 镶黄旗| 林周县| 青州市| 格尔木市| 广东省| 廊坊市| 洞头县| 曲麻莱县| 山东省| 涿州市| 怀集县| 鄂托克前旗| 拉萨市|