- Mastering RabbitMQ
- Emrah Ayanoglu Yusuf Ayta? Dotan Nahum
- 544字
- 2021-07-23 14:52:50
The RabbitMQ environment variables
RabbitMQ environment variables is one of the configuration ways of RabbitMQ. Every operating system has its own set of environment variables for each user. Although operating systems has the ability to have environment variables, the way in which environment variables are changed is slightly different across operating systems.
In Unix-based operating systems, we can change the environment variables rather easily using the rabbitmq-env.conf
file. In the environment configuration file, we can add the environment parameters as follows:
CONFIG_FILE=/etc/rabbitmq/testfile
After changing the rabbitmq-env.conf
file, we have to restart the RabbitMQ server to reload the environment variables.
In Windows, we should use the environment variables of the System Properties for modifying the environment variables of RabbitMQ. We can access to the Environment Variables by navigating to Settings | Control Panel | System Properties | Advanced | Environment Variables, where we use pipes to show transitions. You can see this in the following screenshot:

Windows Environment Parameters
We are now accessing the environment variables of different operating systems. Although, RabbitMQ gives us lots of different environment variables, we will cover the most important ones.
Common environment variables
RabbitMQ gives us lots of great environment variables to control all of the parts of its engine. We don't have enough time to discuss all of the environment variables; however, we will talk about the most important ones. Furthermore, some variables have different default values for Unix and Windows operating systems; we'll consider these variables in the following parts of the topic. Anyway, let's dive into the important variables:
RABBITMQ_BASE
: This variable basically locates the directory of RabbitMQ. This directory has the database and log files.RABBITMQ_CONFIG_FILE
: Although theconfiguration
file of RabbitMQ has a default location, you can change its location using this environment variable.RABBITMQ_LOGS
: RabbitMQ supports different levels of logs. Whenever RabbitMQ is creating alog
file, it has a default location; however, you can change its location using this environment variable.RABBITMQ_NODE_IP_ADDRESS
: RabbitMQ binds to all network interfaces as a default property. As RabbitMQ gives us a full control over network interfaces, we can easily change its binding network using this variable, such as127.0.0.1
.RABBITMQ_NODE_PORT
: RabbitMQ has a default port,5672
; however, we have sometimes collision on ports, so we should change the ports that RabbitMQ binds. We can change RabbitMQ's binding port using this variable.RABBITMQ_PLUGINS_DIR
: RabbitMQ has many very useful plugins that will be enabled through RabbitMQ. RabbitMQ has a default location for these Erlang coded plugins; however, you can change its location.
The RabbitMQ Environment Variables:

Cells marked with* will be explained in the Unix and Windows section
Unix-specific default location
The following table describes the Unix-specific default locations of the given environment variables. Most of the locations are related to the installed location.
Default locations of environment variables for Unix:

Windows-specific default location
In contrast to Unix, Windows default values of the RabbitMQ environment variables are related to the other environment variables of RabbitMQ. The following table shows the Windows default locations.
Default locations of environment variables for Windows:

RabbitMQ environment variables are highly dependent on operating system environment variables. As an example, Computer Name in Unix and Hostname in Windows set the environment variable RABBITMQ_SERVICENAME
and RABBITMQ_NODENAME
. Anyway, the following table describes the dependent environment variables:

- Raspberry Pi for Python Programmers Cookbook(Second Edition)
- Progressive Web Apps with React
- Beginning Java Data Structures and Algorithms
- 程序設(shè)計(jì)與實(shí)踐(VB.NET)
- 深度學(xué)習(xí)經(jīng)典案例解析:基于MATLAB
- Python數(shù)據(jù)可視化:基于Bokeh的可視化繪圖
- arc42 by Example
- 軟件測試項(xiàng)目實(shí)戰(zhàn)之性能測試篇
- 算法大爆炸:面試通關(guān)步步為營
- 云原生Spring實(shí)戰(zhàn)
- INSTANT MinGW Starter
- Spring實(shí)戰(zhàn)(第5版)
- Learning ELK Stack
- INSTANT Yii 1.1 Application Development Starter
- Building Serverless Web Applications