Comments (2)
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.
I'm going to close this as I believe it was a question, which I have answered.
from paho.mqtt.golang.
Related Issues (20)
- MQTTv5: Publish Release encoding is invalid HOT 1
- Duplicate Callback Execution Issue in MQTT Subscription with Wildcard Subscriptions HOT 3
- Why is the release version V1.4.3 and not v1.4.3? HOT 3
- Dual Licensing EDL 1.0 HOT 2
- support of shared subscription in paho.mqtt.golang HOT 5
- No error is returned when I cannot subscribe to a topic. HOT 4
- Feature Request: support json.RawMessage as payload for publishing messages HOT 2
- Any way to retry Publish messages, when QOS is 1 HOT 2
- token.WaitTimeout There is an error missing. HOT 5
- Data race condition HOT 2
- Need to get explicit ACK events HOT 2
- Client.OptionsReader() returns a struct ClientOptionsReader instead of interface which make mocking impossible HOT 4
- Race Condition when subscribing to a topic with a retained message HOT 3
- Unable to recover from "not currently connected and ResumeSubs not set" error HOT 10
- 32 bit bullseye and paho-mqtt 2.0 HOT 2
- MQTT θΏζ₯ε€±θ΄₯: status can only transition to connecting from disconnected HOT 3
- Unable to build using latest version from master HOT 2
- Need a function to get the ClientID of the message sender HOT 4
- goroutine leak when connectionUp(true) return error HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from paho.mqtt.golang.