353 lines
9.2 KiB
Plaintext
353 lines
9.2 KiB
Plaintext
##--------------------------------------------------------------------
|
|
## Zones
|
|
##--------------------------------------------------------------------
|
|
|
|
##--------------------------------------------------------------------
|
|
## External Zone
|
|
|
|
## Idle timeout of the external MQTT connections.
|
|
##
|
|
## Value: duration
|
|
zone.external.idle_timeout = 15s
|
|
|
|
## Enable ACL check.
|
|
##
|
|
## Value: Flag
|
|
zone.external.enable_acl = on
|
|
|
|
## Enable ban check.
|
|
##
|
|
## Value: Flag
|
|
zone.external.enable_ban = on
|
|
|
|
## Enable per connection statistics.
|
|
##
|
|
## Value: on | off
|
|
zone.external.enable_stats = on
|
|
|
|
## The action when acl check reject current operation
|
|
##
|
|
## Value: ignore | disconnect
|
|
## Default: ignore
|
|
zone.external.acl_deny_action = ignore
|
|
|
|
## Force the MQTT connection process GC after this number of
|
|
## messages | bytes passed through.
|
|
##
|
|
## Numbers delimited by `|'. Zero or negative is to disable.
|
|
zone.external.force_gc_policy = 16000|16MB
|
|
|
|
## Max message queue length and total heap size to force shutdown
|
|
## connection/session process.
|
|
## Message queue here is the Erlang process mailbox, but not the number
|
|
## of queued MQTT messages of QoS 1 and 2.
|
|
##
|
|
## Numbers delimited by `|'. Zero or negative is to disable.
|
|
zone.external.force_shutdown_policy = 10000|32MB
|
|
|
|
## Maximum MQTT packet size allowed.
|
|
##
|
|
## Value: Bytes
|
|
## Default: 1MB
|
|
## zone.external.max_packet_size = 64KB
|
|
|
|
## Maximum length of MQTT clientId allowed.
|
|
##
|
|
## Value: Number [23-65535]
|
|
## zone.external.max_clientid_len = 1024
|
|
|
|
## Maximum topic levels allowed. 0 means no limit.
|
|
## Depth so big may lead to subscribing performance issues.
|
|
##
|
|
## Value: Number [0-65535]
|
|
## zone.external.max_topic_levels = 7
|
|
|
|
## Maximum QoS allowed.
|
|
##
|
|
## Value: 0 | 1 | 2
|
|
## zone.external.max_qos_allowed = 2
|
|
|
|
## Maximum Topic Alias, 0 means no limit.
|
|
##
|
|
## Value: 0-65535
|
|
## zone.external.max_topic_alias = 65535
|
|
|
|
## Whether the Server supports retained messages.
|
|
##
|
|
## Value: boolean
|
|
## zone.external.retain_available = true
|
|
|
|
## Whether the Server supports Wildcard Subscriptions
|
|
##
|
|
## Value: boolean
|
|
## zone.external.wildcard_subscription = false
|
|
|
|
## Whether the Server supports Shared Subscriptions
|
|
##
|
|
## Value: boolean
|
|
## zone.external.shared_subscription = false
|
|
|
|
## Server Keep Alive
|
|
##
|
|
## Value: Number
|
|
## zone.external.server_keepalive = 0
|
|
|
|
## The backoff for MQTT keepalive timeout. The broker will kick a connection out
|
|
## until 'Keepalive * backoff * 2' timeout.
|
|
##
|
|
## Value: Float > 0.5
|
|
zone.external.keepalive_backoff = 0.75
|
|
|
|
## Maximum number of subscriptions allowed, 0 means no limit.
|
|
##
|
|
## Value: Number
|
|
zone.external.max_subscriptions = 0
|
|
|
|
## Force to upgrade QoS according to subscription.
|
|
##
|
|
## Value: on | off
|
|
zone.external.upgrade_qos = off
|
|
|
|
## Maximum size of the Inflight Window storing QoS1/2 messages delivered but unacked.
|
|
##
|
|
## Value: Number
|
|
zone.external.max_inflight = 32
|
|
|
|
## Retry interval for QoS1/2 message delivering.
|
|
##
|
|
## Value: Duration
|
|
zone.external.retry_interval = 30s
|
|
|
|
## Maximum QoS2 packets (Client -> Broker) awaiting PUBREL, 0 means no limit.
|
|
##
|
|
## Value: Number
|
|
zone.external.max_awaiting_rel = 100
|
|
|
|
## The QoS2 messages (Client -> Broker) will be dropped if awaiting PUBREL timeout.
|
|
##
|
|
## Value: Duration
|
|
zone.external.await_rel_timeout = 300s
|
|
|
|
## Default session expiry interval for MQTT V3.1.1 connections.
|
|
##
|
|
## Value: Duration
|
|
## -d: day
|
|
## -h: hour
|
|
## -m: minute
|
|
## -s: second
|
|
##
|
|
## Default: 2h, 2 hours
|
|
zone.external.session_expiry_interval = 2h
|
|
|
|
## Maximum queue length. Enqueued messages when persistent client disconnected,
|
|
## or inflight window is full. 0 means no limit.
|
|
##
|
|
## Value: Number >= 0
|
|
zone.external.max_mqueue_len = 1000
|
|
|
|
## Topic priorities.
|
|
## 'none' to indicate no priority table (by default), hence all messages
|
|
## are treated equal
|
|
##
|
|
## Priority number [1-255]
|
|
## Example: topic/1=10,topic/2=8
|
|
## NOTE: comma and equal signs are not allowed for priority topic names
|
|
## NOTE: messages for topics not in the priority table are treated as
|
|
## either highest or lowest priority depending on the configured
|
|
## value for mqueue_default_priority
|
|
##
|
|
zone.external.mqueue_priorities = none
|
|
|
|
## Default to highest priority for topics not matching priority table
|
|
##
|
|
## Value: highest | lowest
|
|
zone.external.mqueue_default_priority = highest
|
|
|
|
## Whether to enqueue QoS0 messages.
|
|
##
|
|
## Value: false | true
|
|
zone.external.mqueue_store_qos0 = true
|
|
|
|
## Whether to turn on flapping detect
|
|
##
|
|
## Value: on | off
|
|
zone.external.enable_flapping_detect = off
|
|
|
|
## Message limit for the a external MQTT connection.
|
|
##
|
|
## Value: Number,Duration
|
|
## Example: 100 messages per 10 seconds.
|
|
#zone.external.rate_limit.conn_messages_in = 100,10s
|
|
|
|
## Bytes limit for a external MQTT connections.
|
|
##
|
|
## Value: Number,Duration
|
|
## Example: 100KB incoming per 10 seconds.
|
|
#zone.external.rate_limit.conn_bytes_in = 100KB,10s
|
|
|
|
## Whether to alarm the congested connections.
|
|
##
|
|
## Sometimes the mqtt connection (usually an MQTT subscriber) may get "congested" because
|
|
## there're too many packets to sent. The socket trys to buffer the packets until the buffer is
|
|
## full. If more packets comes after that, the packets will be "pending" in a queue
|
|
## and we consider the connection is "congested".
|
|
##
|
|
## Enable this to send an alarm when there's any bytes pending in the queue. You could set
|
|
## the `listener.tcp.<ZoneName>.sndbuf` to a larger value if the alarm is triggered too often.
|
|
##
|
|
## The name of the alarm is of format "conn_congestion/<ClientID>/<Username>".
|
|
## Where the <ClientID> is the client-id of the congested MQTT connection.
|
|
## And the <Username> is the username or "unknown_user" of not provided by the client.
|
|
## Default: off
|
|
#zone.external.conn_congestion.alarm = off
|
|
|
|
## Won't clear the congested alarm in how long time.
|
|
## The alarm is cleared only when there're no pending bytes in the queue, and also it has been
|
|
## `min_alarm_sustain_duration` time since the last time we considered the connection is "congested".
|
|
##
|
|
## This is to avoid clearing and sending the alarm again too often.
|
|
## Default: 1m
|
|
#zone.external.conn_congestion.min_alarm_sustain_duration = 1m
|
|
|
|
## Messages quota for the each of external MQTT connection.
|
|
## This value consumed by the number of recipient on a message.
|
|
##
|
|
## Value: Number, Duration
|
|
##
|
|
## Example: 100 messaegs per 1s
|
|
#zone.external.quota.conn_messages_routing = 100,1s
|
|
|
|
## Messages quota for the all of external MQTT connections.
|
|
## This value consumed by the number of recipient on a message.
|
|
##
|
|
## Value: Number, Duration
|
|
##
|
|
## Example: 200000 messaegs per 1s
|
|
#zone.external.quota.overall_messages_routing = 200000,1s
|
|
|
|
## All the topics will be prefixed with the mountpoint path if this option is enabled.
|
|
##
|
|
## Variables in mountpoint path:
|
|
## - %c: clientid
|
|
## - %u: username
|
|
##
|
|
## Value: String
|
|
## zone.external.mountpoint = devicebound/
|
|
|
|
## Whether use username replace client id
|
|
##
|
|
## Value: boolean
|
|
## Default: false
|
|
zone.external.use_username_as_clientid = false
|
|
|
|
## Whether to ignore loop delivery of messages.(for mqtt v3.1.1)
|
|
##
|
|
## Value: true | false
|
|
zone.external.ignore_loop_deliver = false
|
|
|
|
## Whether to parse the MQTT frame in strict mode
|
|
##
|
|
## Value: true | false
|
|
zone.external.strict_mode = false
|
|
|
|
## Specify the response information returned to the client
|
|
##
|
|
## Value: String
|
|
## zone.external.response_information = example
|
|
|
|
##--------------------------------------------------------------------
|
|
## Internal Zone
|
|
|
|
zone.internal.allow_anonymous = true
|
|
|
|
## Enable per connection stats.
|
|
##
|
|
## Value: Flag
|
|
zone.internal.enable_stats = on
|
|
|
|
## Enable ACL check.
|
|
##
|
|
## Value: Flag
|
|
zone.internal.enable_acl = off
|
|
|
|
## The action when acl check reject current operation
|
|
##
|
|
## Value: ignore | disconnect
|
|
## Default: ignore
|
|
zone.internal.acl_deny_action = ignore
|
|
|
|
## See zone.$name.force_gc_policy
|
|
## zone.internal.force_gc_policy = 128000|128MB
|
|
|
|
## See zone.$name.wildcard_subscription.
|
|
##
|
|
## Value: boolean
|
|
## zone.internal.wildcard_subscription = true
|
|
|
|
## See zone.$name.shared_subscription.
|
|
##
|
|
## Value: boolean
|
|
## zone.internal.shared_subscription = true
|
|
|
|
## See zone.$name.max_subscriptions.
|
|
##
|
|
## Value: Integer
|
|
zone.internal.max_subscriptions = 0
|
|
|
|
## See zone.$name.max_inflight
|
|
##
|
|
## Value: Number
|
|
zone.internal.max_inflight = 128
|
|
|
|
## See zone.$name.max_awaiting_rel
|
|
##
|
|
## Value: Number
|
|
zone.internal.max_awaiting_rel = 1000
|
|
|
|
## See zone.$name.max_mqueue_len
|
|
##
|
|
## Value: Number >= 0
|
|
zone.internal.max_mqueue_len = 10000
|
|
|
|
## Whether to enqueue Qos0 messages.
|
|
##
|
|
## Value: false | true
|
|
zone.internal.mqueue_store_qos0 = true
|
|
|
|
## Whether to turn on flapping detect
|
|
##
|
|
## Value: on | off
|
|
zone.internal.enable_flapping_detect = off
|
|
|
|
## See zone.$name.force_shutdown_policy
|
|
zone.internal.force_shutdown_policy = 128000|128MB
|
|
|
|
## All the topics will be prefixed with the mountpoint path if this option is enabled.
|
|
##
|
|
## Variables in mountpoint path:
|
|
## - %c: clientid
|
|
## - %u: username
|
|
##
|
|
## Value: String
|
|
## zone.internal.mountpoint = cloudbound/
|
|
|
|
## Whether to ignore loop delivery of messages.(for mqtt v3.1.1)
|
|
##
|
|
## Value: true | false
|
|
zone.internal.ignore_loop_deliver = false
|
|
|
|
## Whether to parse the MQTT frame in strict mode
|
|
##
|
|
## Value: true | false
|
|
zone.internal.strict_mode = false
|
|
|
|
## Specify the response information returned to the client
|
|
##
|
|
## Value: String
|
|
## zone.internal.response_information = example
|
|
|
|
## Allow the zone's clients to bypass authentication step
|
|
##
|
|
## Value: true | false
|
|
zone.internal.bypass_auth_plugins = true
|