:orphan: .. title:: CONFIG_MQTT_CLEAN_SESSION .. kconfig:: CONFIG_MQTT_CLEAN_SESSION CONFIG_MQTT_CLEAN_SESSION ######################### *MQTT Clean Session Flag.* Type: ``bool`` Help ==== .. code-block:: none When a client connects to a MQTT broker using a persistent session, the message broker saves all subscriptions. When the client disconnects, the message broker stores unacknowledged QoS 1 messages and new QoS 1 messages published to topics to which the client is subscribed. When the client reconnects to the persistent session, all subscriptions are reinstated and all stored messages are sent to the client. Setting this flag to 0 allows the client to create a persistent session. Direct dependencies =================== \ :kconfig:`MQTT_LIB ` && \ :kconfig:`NETWORKING ` *(Includes any dependencies from ifs and menus.)* Defaults ======== No defaults. Implicitly defaults to ``n``. Kconfig definition ================== At ``/net/lib/mqtt/Kconfig:43`` Included via ``Kconfig:8`` → ``Kconfig.zephyr:44`` → ``/Kconfig:39`` → ``/net/Kconfig:89`` → ``/net/lib/Kconfig:10`` Menu path: (Top) → Sub Systems and OS Services → Networking → Link layer and IP networking support → Network Protocols → Socket MQTT Library Support .. code-block:: kconfig config MQTT_CLEAN_SESSION bool "MQTT Clean Session Flag." depends on MQTT_LIB && NETWORKING help When a client connects to a MQTT broker using a persistent session, the message broker saves all subscriptions. When the client disconnects, the message broker stores unacknowledged QoS 1 messages and new QoS 1 messages published to topics to which the client is subscribed. When the client reconnects to the persistent session, all subscriptions are reinstated and all stored messages are sent to the client. Setting this flag to 0 allows the client to create a persistent session. *(The 'depends on' condition includes propagated dependencies from ifs and menus.)*