View Source API Reference mqtt_sessions v2.8.0

Modules

Session management for a MQTT server.

Sidejobs for handling topic subscriptions

Start a supervisor with a session registry and a topic tree

Process handling one single MQTT session. MQTT connections attach and detach from this session. Buffers outgoing messages if there is no connection attached. For every session we also start a mqtt_sessions_will process which will trigger a session kill if the session is disconnected too long, or if the session crashes. If the session is killed then the optional will message is published by the will process. If a client is disconnected then messages are buffered. The buffering behaviour depends on the QoS of the message. QoS 0 messages are only buffered if the connection was down for a very short period. QoS 1 and 2 messages are buffered for a period of time. This period is either the message_expiry_interval or the default buffered message expiry. There is also a maximum number of messages buffered. Past the maximum the buffer will start shedding messages. This is separate for QoS 0 and QoS 1/2 messages.

Simple one-for-one supervisor for all mqtt_sessions_process workers.

Registry for all the sessions in a namespace

Process owning the MQTT topic router.

MQTT sessions runtime ACL interface.

Main supervisor, starts registry and default pool.

Watchdog process, publishes the will and kills the session if it disconnected too long or crashes. The timeout till the session is killed is either the (default) session expiry from mqtt_sessions_process or the expiry interval set in the options of the will message. Periodically the sessions process is polled to see if it is still connected, this is done to prevent any missed disconnect events from the sessions process.

Supervisor for watchdog processes that process wills