messages

val messages: SharedFlow<MqttMessage>

Flow of incoming MQTT messages from subscribed topics.

Messages are emitted as they arrive from the broker. Each message includes the topic, payload, QoS level, retain flag, and any MQTT 5.0 properties. The flow uses a buffer of MESSAGE_BUFFER_CAPACITY messages; if the collector is too slow, the oldest undelivered messages are dropped.

Start collecting before calling subscribe to avoid missing messages.