From 1bc175e0ce8d40a6ea27f7bf2aa50bf3065f85e1 Mon Sep 17 00:00:00 2001 From: HuangDan Date: Thu, 27 Sep 2018 19:49:13 +0800 Subject: [PATCH] Add mountpoint config to zone configs --- etc/emqx.conf | 18 ++++++++++++++++++ priv/emqx.schema | 4 ++++ 2 files changed, 22 insertions(+) diff --git a/etc/emqx.conf b/etc/emqx.conf index 60b576379..18a7d6fd6 100644 --- a/etc/emqx.conf +++ b/etc/emqx.conf @@ -665,6 +665,15 @@ zone.external.max_mqueue_len = 1000 ## Value: false | true zone.external.mqueue_store_qos0 = true +## 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/ + ##-------------------------------------------------------------------- ## Internal Zone @@ -715,6 +724,15 @@ zone.internal.max_mqueue_len = 1000 ## Value: false | true zone.internal.mqueue_store_qos0 = true +## 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/ + ##-------------------------------------------------------------------- ## Listeners ##-------------------------------------------------------------------- diff --git a/priv/emqx.schema b/priv/emqx.schema index 3d9328bf2..2450a6876 100644 --- a/priv/emqx.schema +++ b/priv/emqx.schema @@ -842,6 +842,10 @@ end}. {datatype, string} ]}. +{mapping, "zone.$name.mountpoint", "emqx.zones", [ + {datatype, string} +]}. + {translation, "emqx.zones", fun(Conf) -> Mapping = fun("retain_available", Val) -> {mqtt_retain_available, Val};