diff --git a/apps/emqx_conf/etc/emqx_conf.conf b/apps/emqx_conf/etc/emqx_conf.conf index 45733d158..8ad84fd7c 100644 --- a/apps/emqx_conf/etc/emqx_conf.conf +++ b/apps/emqx_conf/etc/emqx_conf.conf @@ -1,13 +1,17 @@ ## NOTE: -## The order of priority for configuration is: -## environment variables, 'etc/emqx.conf', and 'data/configs/cluster.hocon'. -## 1. Settings in environment variables starting with 'EMQX_' are given the highest priority. -## 2. Configuration settings in the 'etc/emqx.conf' file may be overwritten by environment variables. -## 3. Changes made through the EMQX dashboard UI, management HTTP API, or CLI -## overwrite the 'data/configs/cluster.hocon' file at runtime. -## 4. If you modify a configuration setting using the API, the change takes effect immediately. -## 5. However, if the same setting is configured differently in the 'etc/emqx.conf' file, -## 'etc/emqx.conf' takes priority after a reboot. +## The EMQX configuration is prioritized (overlayed) in the following order: +## `cluster.hocon < emqx.conf < environment variables`. + +## Settings in environment variables that begin with 'EMQX_' have the highest priority +## and will override any settings in the `etc/emqx.conf` file. + +## Changes made through the EMQX dashboard UI, management HTTP API, or CLI +## will be written into the `data/configs/cluster.hocon` file at runtime and will take effect immediately. + +## However, if the same configuration items are set differently in the `etc/emqx.conf` file, +## the runtime updates will be overridden by the settings in `etc/emqx.conf` after the node restarts. + +## To avoid confusion, it is highly recommend NOT to have the same config keys in both `cluster.hocon` and `emqx.conf`. ## All configuration details can be found in emqx.conf.example