diff --git a/etc/emqx.conf b/etc/emqx.conf index a211d91d9..9415834ef 100644 --- a/etc/emqx.conf +++ b/etc/emqx.conf @@ -554,6 +554,11 @@ mqtt.ignore_loop_deliver = false ## Value: duration zone.external.idle_timeout = 15s +## Hibernate after a duration of idle state. +## +## Value: duration +zone.external.hibernate_after = 60s + ## Publish limit for the external MQTT connections. ## ## Value: Number,Duration diff --git a/priv/emqx.schema b/priv/emqx.schema index 5e408ef38..abe646a10 100644 --- a/priv/emqx.schema +++ b/priv/emqx.schema @@ -725,6 +725,12 @@ end}. {datatype, {duration, ms}} ]}. +%% @doc Hibernate after a duration of idle state. +{mapping, "zone.$name.hibernate_after", "emqx.zones", [ + {default, "60s"}, + {datatype, {duration, ms}} +]}. + {mapping, "zone.$name.allow_anonymous", "emqx.zones", [ {datatype, {enum, [true, false]}} ]}.