326 lines
8.2 KiB
Plaintext
326 lines
8.2 KiB
Plaintext
##====================================================================
|
||
## EMQ X Configuration R4.0
|
||
##====================================================================
|
||
|
||
include {{ platform_etc_dir }}/cluster.conf
|
||
include {{ platform_etc_dir }}/rpc.conf
|
||
include {{ platform_etc_dir }}/logger.conf
|
||
include {{ platform_etc_dir }}/zones.conf
|
||
include {{ platform_etc_dir }}/listeners.conf
|
||
include {{ platform_etc_dir }}/sys_mon.conf
|
||
|
||
##--------------------------------------------------------------------
|
||
## Node
|
||
##--------------------------------------------------------------------
|
||
|
||
## Node name.
|
||
##
|
||
## See: http://erlang.org/doc/reference_manual/distributed.html
|
||
##
|
||
## Value: <name>@<host>
|
||
##
|
||
## Default: emqx@127.0.0.1
|
||
node.name = emqx@127.0.0.1
|
||
|
||
## Cookie for distributed node communication.
|
||
##
|
||
## Value: String
|
||
node.cookie = emqxsecretcookie
|
||
|
||
## Data dir for the node
|
||
##
|
||
## Value: Folder
|
||
node.data_dir = {{ platform_data_dir }}
|
||
|
||
## Heartbeat monitoring of an Erlang runtime system. Comment the line to disable
|
||
## heartbeat, or set the value as 'on'
|
||
##
|
||
## Value: on
|
||
##
|
||
## vm.args: -heart
|
||
## node.heartbeat = on
|
||
|
||
## Sets the number of threads in async thread pool. Valid range is 0-1024.
|
||
##
|
||
## See: http://erlang.org/doc/man/erl.html
|
||
##
|
||
## Value: 0-1024
|
||
##
|
||
## vm.args: +A Number
|
||
## node.async_threads = 4
|
||
|
||
## Sets the maximum number of simultaneously existing processes for this
|
||
## system if a Number is passed as value.
|
||
##
|
||
## See: http://erlang.org/doc/man/erl.html
|
||
##
|
||
## Value: Number [1024-134217727]
|
||
##
|
||
## vm.args: +P Number
|
||
## node.process_limit = 2097152
|
||
|
||
## Sets the maximum number of simultaneously existing ports for this system.
|
||
##
|
||
## See: http://erlang.org/doc/man/erl.html
|
||
##
|
||
## Value: Number [1024-134217727]
|
||
##
|
||
## vm.args: +Q Number
|
||
## node.max_ports = 1048576
|
||
|
||
## Sets the distribution buffer busy limit (dist_buf_busy_limit).
|
||
##
|
||
## See: http://erlang.org/doc/man/erl.html
|
||
##
|
||
## Value: Number [1KB-2GB]
|
||
##
|
||
## vm.args: +zdbbl size
|
||
## node.dist_buffer_size = 8MB
|
||
|
||
## Sets the maximum number of ETS tables. Note that mnesia and SSL will
|
||
## create temporary ETS tables.
|
||
##
|
||
## Value: Number
|
||
##
|
||
## vm.args: +e Number
|
||
## node.max_ets_tables = 262144
|
||
|
||
## Global GC Interval.
|
||
##
|
||
## Value: Duration
|
||
##
|
||
## Examples:
|
||
## - 2h: 2 hours
|
||
## - 30m: 30 minutes
|
||
## - 20s: 20 seconds
|
||
##
|
||
## Defaut: 15 minutes
|
||
node.global_gc_interval = 15m
|
||
|
||
## Tweak GC to run more often.
|
||
##
|
||
## Value: Number [0-65535]
|
||
##
|
||
## vm.args: -env ERL_FULLSWEEP_AFTER Number
|
||
## node.fullsweep_after = 1000
|
||
|
||
## Crash dump log file.
|
||
##
|
||
## Value: Log file
|
||
node.crash_dump = {{ platform_log_dir }}/crash.dump
|
||
|
||
## Specify SSL Options in the file if using SSL for Erlang Distribution.
|
||
##
|
||
## Value: File
|
||
##
|
||
## vm.args: -ssl_dist_optfile <File>
|
||
## node.ssl_dist_optfile = {{ platform_etc_dir }}/ssl_dist.conf
|
||
|
||
## Sets the net_kernel tick time. TickTime is specified in seconds.
|
||
## Notice that all communicating nodes are to have the same TickTime
|
||
## value specified.
|
||
##
|
||
## See: http://www.erlang.org/doc/man/kernel_app.html#net_ticktime
|
||
##
|
||
## Value: Number
|
||
##
|
||
## vm.args: -kernel net_ticktime Number
|
||
## node.dist_net_ticktime = 120
|
||
|
||
## Sets the port range for the listener socket of a distributed Erlang node.
|
||
## Note that if there are firewalls between clustered nodes, this port segment
|
||
## for nodes’ communication should be allowed.
|
||
##
|
||
## See: http://www.erlang.org/doc/man/kernel_app.html
|
||
##
|
||
## Value: Port [1024-65535]
|
||
node.dist_listen_min = 6369
|
||
node.dist_listen_max = 6369
|
||
|
||
##--------------------------------------------------------------------
|
||
## Authentication/Access Control
|
||
##--------------------------------------------------------------------
|
||
|
||
## Allow anonymous authentication by default if no auth plugins loaded.
|
||
## Notice: Disable the option in production deployment!
|
||
##
|
||
## Value: true | false
|
||
allow_anonymous = true
|
||
|
||
## Allow or deny if no ACL rules matched.
|
||
##
|
||
## Value: allow | deny
|
||
acl_nomatch = allow
|
||
|
||
## Whether to enable ACL cache.
|
||
##
|
||
## If enabled, ACLs roles for each client will be cached in the memory
|
||
##
|
||
## Value: on | off
|
||
enable_acl_cache = on
|
||
|
||
## The maximum count of ACL entries can be cached for a client.
|
||
##
|
||
## Value: Integer greater than 0
|
||
## Default: 32
|
||
acl_cache_max_size = 32
|
||
|
||
## The time after which an ACL cache entry will be deleted
|
||
##
|
||
## Value: Duration
|
||
## Default: 1 minute
|
||
acl_cache_ttl = 1m
|
||
|
||
## The action when acl check reject current operation
|
||
##
|
||
## Value: ignore | disconnect
|
||
## Default: ignore
|
||
acl_deny_action = ignore
|
||
|
||
## Specify the global flapping detect policy.
|
||
## The value is a string composed of flapping threshold, duration and banned interval.
|
||
## 1. threshold: an integer to specfify the disconnected times of a MQTT Client;
|
||
## 2. duration: the time window for flapping detect;
|
||
## 3. banned interval: the banned interval if a flapping is detected.
|
||
##
|
||
## Value: Integer,Duration,Duration
|
||
flapping_detect_policy = 30, 1m, 5m
|
||
|
||
##--------------------------------------------------------------------
|
||
## MQTT Protocol
|
||
##--------------------------------------------------------------------
|
||
|
||
## Maximum MQTT packet size allowed.
|
||
##
|
||
## Value: Bytes
|
||
## Default: 1MB
|
||
mqtt.max_packet_size = 1MB
|
||
|
||
## Maximum length of MQTT clientId allowed.
|
||
##
|
||
## Value: Number [23-65535]
|
||
mqtt.max_clientid_len = 65535
|
||
|
||
## Maximum topic levels allowed. 0 means no limit.
|
||
## Depth so big may lead to subscribing performance issues.
|
||
##
|
||
## Value: Number [0-65535]
|
||
## Default: 128
|
||
mqtt.max_topic_levels = 128
|
||
|
||
## Maximum QoS allowed.
|
||
##
|
||
## Value: 0 | 1 | 2
|
||
mqtt.max_qos_allowed = 2
|
||
|
||
## Maximum Topic Alias, 0 means no topic alias supported.
|
||
##
|
||
## Value: 0-65535
|
||
mqtt.max_topic_alias = 65535
|
||
|
||
## Whether the Server supports MQTT retained messages.
|
||
##
|
||
## Value: boolean
|
||
mqtt.retain_available = true
|
||
|
||
## Whether the Server supports MQTT Wildcard Subscriptions
|
||
##
|
||
## Value: boolean
|
||
mqtt.wildcard_subscription = true
|
||
|
||
## Whether the Server supports MQTT Shared Subscriptions.
|
||
##
|
||
## Value: boolean
|
||
mqtt.shared_subscription = true
|
||
|
||
## Whether to ignore loop delivery of messages.(for mqtt v3.1.1)
|
||
##
|
||
## Value: true | false
|
||
mqtt.ignore_loop_deliver = false
|
||
|
||
## Whether to parse the MQTT frame in strict mode
|
||
##
|
||
## Value: true | false
|
||
mqtt.strict_mode = false
|
||
|
||
## Specify the response information returned to the client
|
||
##
|
||
## Value: String
|
||
## mqtt.response_information = example
|
||
|
||
##--------------------------------------------------------------------
|
||
## Broker
|
||
##--------------------------------------------------------------------
|
||
|
||
## System interval of publishing $SYS messages.
|
||
##
|
||
## Value: Duration
|
||
## Default: 1m, 1 minute
|
||
broker.sys_interval = 1m
|
||
|
||
## System heartbeat interval of publishing following heart beat message:
|
||
## - "$SYS/brokers/<node>/uptime"
|
||
## - "$SYS/brokers/<node>/datetime"
|
||
##
|
||
## Value: Duration
|
||
## Default: 30s
|
||
broker.sys_heartbeat = 30s
|
||
|
||
## Session locking strategy in a cluster.
|
||
##
|
||
## Value: Enum
|
||
## - local
|
||
## - one
|
||
## - quorum
|
||
## - all
|
||
broker.session_locking_strategy = quorum
|
||
|
||
## Dispatch strategy for shared subscription
|
||
##
|
||
## Value: Enum
|
||
## - random
|
||
## - round_robin
|
||
## - sticky
|
||
## - hash
|
||
broker.shared_subscription_strategy = random
|
||
|
||
## Enable/disable shared dispatch acknowledgement for QoS1 and QoS2 messages
|
||
## This should allow messages to be dispatched to a different subscriber in
|
||
## the group in case the picked (based on shared_subscription_strategy) one # is offline
|
||
##
|
||
## Value: Enum
|
||
## - true
|
||
## - false
|
||
broker.shared_dispatch_ack_enabled = false
|
||
|
||
## Enable batch clean for deleted routes.
|
||
##
|
||
## Value: Flag
|
||
broker.route_batch_clean = off
|
||
|
||
## Performance toggle for subscribe/unsubscribe wildcard topic.
|
||
## Change this toggle only when there are many wildcard topics.
|
||
## Value: Enum
|
||
## - key: mnesia translational updates with per-key locks. recommended for single node setup.
|
||
## - tab: mnesia translational updates with table lock. recommended for multi-nodes setup.
|
||
## - global: global lock protected updates. recommended for larger cluster.
|
||
## NOTE: when changing from/to 'global' lock, it requires all nodes in the cluster
|
||
## to be stopped before the change.
|
||
broker.perf.route_lock_type = key
|
||
|
||
##-------------------------------------------------------------------
|
||
## Plugins
|
||
##-------------------------------------------------------------------
|
||
|
||
## The etc dir for plugins' config.
|
||
##
|
||
## Value: Folder
|
||
plugins.etc_dir = {{ platform_etc_dir }}/plugins/
|
||
|
||
## The file to store loaded plugin names.
|
||
##
|
||
## Value: File
|
||
plugins.loaded_file = {{ platform_data_dir }}/loaded_plugins
|
||
|
||
{{ additional_configs }}
|