Comments (3)
If you use a high QOS level such as 1 or 2 the client will handle re transmission for you, see here. This however is transparent to you unless you listen to the published message stream, from the client api -
/// Published message stream. A publish message is added to this
/// stream on completion of the message publishing protocol for a Qos level.
/// Attach listeners only after connect has been called.
Stream<MqttPublishMessage>? get published =>
publishingManager != null ? publishingManager!.published.stream : null;
from mqtt_client.
If you use a high QOS level such as 1 or 2 the client will handle re transmission for you, see here. This however is transparent to you unless you listen to the published message stream, from the client api -
/// Published message stream. A publish message is added to this /// stream on completion of the message publishing protocol for a Qos level. /// Attach listeners only after connect has been called. Stream<MqttPublishMessage>? get published => publishingManager != null ? publishingManager!.published.stream : null;
Hello, I'm a newbie. Isn't there a method to listen specifically for successful delivery? Similar to Bluetooth write success callback. Any sample code? Thank you very much
from mqtt_client.
All the client does is to place successfully sent messages on the publish stream. How you ascertain your messages are being delivered to the broker as you expect is up to you, you could not send the next message until the last one you have sent appears on the publish queue, you could place a token in the payload say and keep track that way, there are other ways. The client shouldn't constrain you in how you do this.
Listening on the publish stream is like a 'write success callback' as you say above.
from mqtt_client.
Related Issues (20)
- Hot reload causes infinite MQTT connect loop HOT 3
- Connection Lost When App Killed HOT 1
- Failed to connect to mqtt, I donβt know where the problem lies HOT 1
- mqtt sets reconnection timeout to expire HOT 30
- Need shorter timeout when connection can't be established HOT 9
- feat: Added a connection timeout callback HOT 8
- Add Connection Ack message to connection status HOT 1
- MqttBrowserClient with self-signed certificate HOT 1
- How to add proxy to see content in proxy tools like Charles/Proxyman? HOT 1
- retain:true publishing issue (using IoT Core) HOT 3
- Differences in automatic reconnection between IOS and Android HOT 1
- '400 Bad Request' response while connecting with websocket to rabbitmq HOT 3
- How to connect mqtt with socket header options? HOT 3
- mqttjs:client _checkPing :: checking ping... Runs twice in rapid succession some times HOT 1
- How to determine the cause of the disconnect? HOT 1
- Available bytes is less than the message size HOT 4
- error:Bad state: Cannot add new events after calling close HOT 8
- AWS IoT Certificate - Use .bks file certificate HOT 1
- NoConnectionException: Missing Connection Acknowledgement HOT 4
- Ping triggers client.update and brings the same message multiple times HOT 1
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 mqtt_client.