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

MQTT_LIB && NETWORKING

(Includes any dependencies from ifs and menus.)

Defaults

No defaults. Implicitly defaults to n.

Kconfig definition

At <Zephyr>/subsys/net/lib/mqtt/Kconfig:37

Included via <Zephyr>/Kconfig:8<Zephyr>/Kconfig.zephyr:34<Zephyr>/subsys/Kconfig:34<Zephyr>/subsys/net/Kconfig:89<Zephyr>/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

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.)