Git Product home page Git Product logo

Comments (2)

MattBrittan avatar MattBrittan commented on June 9, 2024

This is not really the place for general MQTT questions - one of the resources mentioned in the readme is probably more appropriate. Alternatively the specs are quite readable, or there are heaps of guides (e.g. this).

The DUP flag should be set whenever a PUB packet is retransmitted (with MQTT v5 this only occurs upon connection, with V3 it is permitted to happen at other times but most brokers now follow the v5 rules). Unfortunately the flag is of limited use to the receiver because it may, or may not, have received the message when it was previously transmitted (so it's really only an indication that it's worth checking if the packet has been handled previously). At QOS1 doing this requires info outside of that provided by the protocol (e.g. check database to see if the record is there). As QOS2 we can check if we have sent a PUBREL (should be in the session).

Note that when I say "PUB Packet" I am talking about an MQTT packet (with a specific packet identifier). If you, as an end user, elect to send the same data twice then it is not appropriate to use the DUP flag (you need to implement something to detect dupilicates at the application layer).

You may find my current work implementing this in the v5 client of interest.

from paho.mqtt.golang.

MattBrittan avatar MattBrittan commented on June 9, 2024

I'm going to close this as I believe it was a question, which I have answered.

from paho.mqtt.golang.

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.