:orphan: .. title:: MQTT_CLEAN_SESSION .. option:: CONFIG_MQTT_CLEAN_SESSION *MQTT Clean Session Flag.* Type: ``bool`` 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. Direct dependencies =================== \ :option:`MQTT_LIB ` && \ :option:`NETWORKING ` *(Includes any dependencies from ifs and menus.)* Defaults ======== No defaults. Implicitly defaults to ``n``. Kconfig definition ================== .. highlight:: kconfig At ``subsys/net/lib/mqtt/Kconfig:37`` Included via ``Kconfig:8`` → ``Kconfig.zephyr:34`` → ``subsys/Kconfig:37`` → ``subsys/net/Kconfig:89`` → ``subsys/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 .. parsed-literal:: config MQTT_CLEAN_SESSION bool "MQTT Clean Session Flag." depends on \ :option:`MQTT_LIB ` && \ :option:`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.)*