From 46788ad31b737978f114652094ab664b90a98f1d Mon Sep 17 00:00:00 2001 From: Tobias Lindahl Date: Tue, 23 Nov 2021 13:53:04 +0100 Subject: [PATCH] chore(persistent_sessions): add descriptions of persistent session configs --- apps/emqx/src/emqx_schema.erl | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/apps/emqx/src/emqx_schema.erl b/apps/emqx/src/emqx_schema.erl index 4c96d30ca..91e25d228 100644 --- a/apps/emqx/src/emqx_schema.erl +++ b/apps/emqx/src/emqx_schema.erl @@ -162,22 +162,49 @@ fields("persistent_session_store") -> [ {"enabled", sc(boolean(), #{ default => "false" + , description => """ +Use the database to store information about persistent sessions. +This makes it possible to migrate a client connection to another +cluster node if a node is stopped. +""" })}, {"storage_type", sc(hoconsc:union([ram, disc]), #{ default => disc + , description => """ +Store information about persistent sessions on disc or in ram. +If ram is chosen, all information about persistent sessions remains +as long as at least one node in a cluster is alive to keep the information. +If disc is chosen, the information is persisted on disc and will survive +cluster restart, at the price of more disc usage and less throughput. +""" })}, {"max_retain_undelivered", sc(duration(), #{ default => "1h" + , description => """ +The time messages that was not delivered to a persistent session +is stored before being garbage collected if the node the previous +session was handled on restarts of is stopped. +""" })}, {"message_gc_interval", sc(duration(), #{ default => "1h" + , description => """ +The starting interval for garbage collection of undelivered messages to +a persistent session. This affects how often the \"max_retain_undelivered\" +is checked for removal. +""" })}, {"session_message_gc_interval", sc(duration(), #{ default => "1m" + , description => """ +The starting interval for garbage collection of transient data for +persistent session messages. This does not affect the life time length +of persistent session messages. +""" })} ];