Is MQTT a good solution to this notifications system?

121 views
Skip to first unread message

Peter Dalmaris

unread,
Nov 2, 2014, 6:59:47 AM11/2/14
to mq...@googlegroups.com
Hi, I am exploring solutions to a new project I am working on. The project involves messages generated on a web service (like the latest weather update) and a consumer based on an Arduino. 

The idea is this: the web service will constantly publish the relevant MQTT topic and the consumer will subscribe to that topic to receive updates. 

However, the consumer will be off most of the time. When it turns on, I only want the very latest update to be received as the older ones don't matter any more.

Is MQTT a fitting solution for this setup? I am not clear from the documentation if all the past messages are actually stored on the MQTT broker and then delivered when the consumer finally connect. As I said, I only care for the very last message to be delivered.

Hope what I am asking is clear, thanks for reading.

Stefano Costa

unread,
Nov 3, 2014, 4:10:31 AM11/3/14
to mq...@googlegroups.com
MQTT with retained messages  should perfectly fit your need, as per mosquitto_pub command with "-r" flag set (see man for details) and similar settings when publishing from a custom app using Paho libraries.

It means "dear broker please treat this as a last known good message, and deliver this to client as soon as it subscribes next time"

--
  Stefano Costa
  R&D, Managing Director
  Skype stefanocosta.bluewind
  Twitter @stefanobluewind

--
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.

Peter Dalmaris

unread,
Nov 3, 2014, 6:31:46 PM11/3/14
to mq...@googlegroups.com
Thank you Christian and Stefano, I'll do some experiments. I have a basic setup working, I admit, it's very simple to get this working.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages