Yes. MQTT is just a protocol and supports three types of Quality of Service (QoS):
- QoS 0: Fire and forget
- QoS 1: At least once
- QoS 2: At most once
You can choose to send messages via any one of these QoS which suits your use-case. Apart from this, standard MQTT implementations also involve a "retain" flag for a topic and a message which means that the brokers will maintain the last sent message on the given topic. When new clients subscribe on this topic with "retain" flag set as true, they will instantly receive the last retained message.
Apart from these, there are more extensions that you can build to add persistence to your system. This depends on the specific MQTT implementations which you might have to find out.
You can choose to send messages via any one of these QoS which suits your use-case. Apart from this, standard MQTT implementations also involve a "retain" flag for a topic and a message which means that the brokers will maintain the last sent message on the given topic. When new clients subscribe on this topic with "retain" flag set as true, they will instantly receive the last retained message.
Apart from these, there are more extensions that you can build to add persistence to your system. This depends on the specific MQTT implementations which you might have to find out.