parent
8f35d13e17
commit
5689ad3485
|
@ -525,20 +525,20 @@ zone.external.idle_timeout = 15s
|
|||
|
||||
## Publish limit for the external MQTT connections.
|
||||
##
|
||||
## Value: rate,burst
|
||||
## Default: 10 messages per second, and 100 messages burst.
|
||||
## zone.external.publish_limit = 10,100
|
||||
|
||||
## Enable ban check.
|
||||
##
|
||||
## Value: Flag
|
||||
zone.external.enable_ban = on
|
||||
## Value: Number,Duration
|
||||
## Example: 10 messages per minute.
|
||||
zone.external.publish_limit = 10,1m
|
||||
|
||||
## 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
|
||||
|
@ -766,7 +766,7 @@ listener.tcp.external.zone = external
|
|||
##
|
||||
## Value: rate,burst
|
||||
## Unit: Bps
|
||||
## listener.tcp.external.rate_limit = 1024,4096
|
||||
listener.tcp.external.rate_limit = 1024,4096
|
||||
|
||||
## The access control rules for the MQTT/TCP listener.
|
||||
##
|
||||
|
|
|
@ -676,14 +676,14 @@ end}.
|
|||
{datatype, {enum, [allow, deny]}}
|
||||
]}.
|
||||
|
||||
%% @doc Enable Ban.
|
||||
{mapping, "zone.$name.enable_ban", "emqx.zones", [
|
||||
%% @doc Enable ACL check.
|
||||
{mapping, "zone.$name.enable_acl", "emqx.zones", [
|
||||
{default, off},
|
||||
{datatype, flag}
|
||||
]}.
|
||||
|
||||
%% @doc Enable ACL check.
|
||||
{mapping, "zone.$name.enable_acl", "emqx.zones", [
|
||||
%% @doc Enable Ban.
|
||||
{mapping, "zone.$name.enable_ban", "emqx.zones", [
|
||||
{default, off},
|
||||
{datatype, flag}
|
||||
]}.
|
||||
|
@ -696,7 +696,6 @@ end}.
|
|||
|
||||
%% @doc Publish limit of the MQTT connections.
|
||||
{mapping, "zone.$name.publish_limit", "emqx.zones", [
|
||||
{default, undefined},
|
||||
{datatype, string}
|
||||
]}.
|
||||
|
||||
|
@ -850,6 +849,15 @@ end}.
|
|||
{mqtt_wildcard_subscription, Val};
|
||||
("shared_subscription", Val) ->
|
||||
{mqtt_shared_subscription, Val};
|
||||
("publish_limit", Val) ->
|
||||
[Limit, Duration] = string:tokens(Val, ", "),
|
||||
PubLimit = case cuttlefish_duration:parse(Duration, s) of
|
||||
Secs when is_integer(Secs) ->
|
||||
{list_to_integer(Limit) / Secs, list_to_integer(Limit)};
|
||||
{error, Reason} ->
|
||||
error(Reason)
|
||||
end,
|
||||
{publish_limit, PubLimit};
|
||||
("force_gc_policy", Val) ->
|
||||
[Count, Bytes] = string:tokens(Val, "| "),
|
||||
GcPolicy = case cuttlefish_bytesize:parse(Bytes) of
|
||||
|
|
Loading…
Reference in New Issue