How to detect “unread” mqtt message

Ok I may have a really odd question, but I’m just wondering if there are ways to detect that a device hasn’t read its MQTT topic in a while. I’m basically sending an mqtt message to my broker and it’s being read by I device I can’t easily poll to know the state.

There are other ways to achieve my desired outcome, but it just got me wondering if this was actually possible and if so, how.

Thanks!

1 Like

Hello boojew,

Well, if you are subscribed to it. it will be sent to you in every broker I’ve ever seen. That’s what it does.

You may want to change the QOS to make sure the broker checks if the subscriber received it (and possibly send it again), but it will be sent.

1 Like

The MQTT broker is made with mulitple connections possible, so a topic is not as such read.

Devices usually publish information when they connect, but they might do it in other topics, which you have to find and then monitor.
Use MQTT Explorer to see what is going on in the Broker and see if there is a topic to monitor for your device.