--
To learn more about MQTT please visit http://mqtt.org
---
You received this message because you are subscribed to the Google Groups "MQTT" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mqtt+uns...@googlegroups.com.
To post to this group, send email to mq...@googlegroups.com.
Visit this group at http://groups.google.com/group/mqtt.
For more options, visit https://groups.google.com/d/optout.
Hi Ravi – see inline.
Shawn
From: mq...@googlegroups.com [mailto:mq...@googlegroups.com]
On Behalf Of RK
Sent: May-16-15 2:05 PM
To: mq...@googlegroups.com
Subject: [mqtt] What happens to topic updates when the subscriber is down?
Hello All:
I am new to MQTT and the rest of the IoT and other software constructs outside of automotive control systems. I have a fundamental question about the behavior of the broker.
Use case is
1. A subscriber to a topic goes offline.
2. Publisher of that topic sends an update / new PUBLISH message
Question
Does the MQTT broker store this message until the subscriber is back online? Or it simply maintains a list of currently active subscribers and delivers the message only to them?
[SPM] in order to ensure that a message published while a subscriber is offline is stored by the broker so the subscriber can retrieve the message when the subscriber comes back online:
- The publisher must publish its messages with a QoS of 1 or 2 – not 0. (each message published is given a QoS)
- The subscriber must issue its Subscribe for the topic with a QoS of 1 or 2- not zero (each subscription has a QoS)
- Subscribers must connect to the broker with the Clean Flag = 0 - so that all its state is maintained by the broker (clean = 1 deletes all previous state on the broker)
Background
I intend to use MQTT Broker on a Raspberry Pi and the clients could be controlled units like fans / lights / door locks etc.,
My MQTT clients will be on an MCU running FreeRTOS connected to ESP8266 - Does anybody have a recommendation / suggestion on a embedded C client implementation?