Closed mushroomwithegg closed 3 years ago
Persistence stores all incoming
outgoing
qos > 0 messages (because if qos is grater then 1 they have to wait to receive a puback/pubcomp), subscriptions
and retained
messages. In your case you maybe want to use retained
messages, when a retained message is sent to broker to a specific topic the broker will store it in persistence and send it back to clients when they subscribe to a topic (or a wildecard) that matches that retained message topic (and any others matches)
I checked retained messages and it's only store 1 message at a time right?
@iwillflytothemoon The last received message of each topic, yes. If you need an historical storage checkout influxdb (timeseries database) telegraf (with mqtt integration to store mqtt messages) and also grafana (for visualization)
If I publish a message with QoS of >1 without any subscriber at first, will it store the messages in the broker? And after publishing the message, then I subscribed in the same topic, will I get all the messages published?