GithubHelp home page GithubHelp logo

Comments (1)

Thalhammer avatar Thalhammer commented on August 28, 2024

Maybe, if the device is sleeping, then the retain flag is allowed?

You shouldn't need that. If you send the set message with a qos of 1 or 2 it will get queued by the broker until the device reconnects.

Also does a later non-retained message delete it again to ensure we cleanup after it?

No. As stated by MQTT-3.3.1-12 If the RETAIN flag is 0, in a PUBLISH Packet sent by a Client to a Server, the Server MUST NOT store the message and MUST NOT remove or replace any existing retained message. I.e. the retained message would stay and get delivered anyway.

Requires devices to not reconnect using a "clean" session

Which is likely what would be a recommended behavior anyway, cause it avoids having to subscribe after every connect and therefore improves latency, bandwidth usage and (potentially) reduces cost (e.g. GSM networks). The client can use the session present bit of the connect reply to check if it needs to subscribe without having to keep local state. The only special case you need is if a firmware upgrade / configuration change adds new subscriptions.

Seems like a device must specify this in its description.

I don't think so. IMHO all thats needed is allowing QOS1/2 publish for the set topic.

from convention.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.