You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Beginning with version 2.6, payloads of arbitrary length may be published, see [Notes](#notes).
212
212
- The functions return a boolean that indicates if the publishing has been successful (true).
213
213
214
+
Obtain the last used packet ID and prepare the publication of a duplicate message using the specified packet ID:
215
+
216
+
```c++
217
+
uint16_t lastPacketID();
218
+
void prepareDuplicate(uint16_t packetID);
219
+
```
220
+
221
+
- These functions may be used to implement a retry logic for failed publications of QoS1 and QoS2 messages.
222
+
- The `lastPacketID()` function can be used after calling `publish()` to obtain the used packet ID.
223
+
- The `prepareDuplicate()` function may be called before `publish()` to temporarily change the next used packet ID and flag the message as a duplicate.
0 commit comments