Handle QoS2 messages when the library loses state - store state in NVM
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 15/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- c
- Ambito
- embedded-iot, networking
Direzione di ricerca
Start by reading the QoS2 receive flow and how MQTT_ProcessLoop handles MQTT_PACKET_TYPE_PUBREL when outgoingPublishRecords is empty. The issue names no files or tests, so locate the relevant code and tests in the repository. Done means the client handles a reboot between receiving a QoS2 message and receiving PUBREL without returning MQTTBadResponse; the linked open pull request indicates work is already underway.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
It is a very narow corner case but stil it breaks the client and renders it unusable.
- coreMQTT client is running on an embedded device, it subscribed to a topic with QoS2.
- The issue happens when a message is received and then the device reboots (for unrelated to coreMQTT reasons).
- When it boots again and re-connects to the broker it immidiately receives MQTT_PACKET_TYPE_PUBREL but since the device was rebooted the library has no knowleadge of the packet it received before, outgoingPublishRecords is empty and MQTT_ProcessLoop returns MQTTBadResponse.
Q: How would you suggest to handle a situation like this? There are no public functions in the library to get the failed packet id and to get access to outgoingPublishRecords structure that one could simply inject a record with id and MQTT_PACKET_TYPE_PUBCOMP type to let go that record. In the corner case like this I guess it's ok to lose the record since not much you can do if device reboots.
- Lingua principale
- C
- Stelle
- 239
- Fork
- 131
- Merge medio
- 6h 51m
- PR unite (30g)
- 6
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di FreeRTOS/coreMQTT
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 32/100
-
PUBCOMP rejected with MQTTIllegalState after reconnect replays a stored PUBRELForse già presa @LogikerKit l’ha presa 25 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 56/100
-
coreMQTT State Access AuditApertahelp wanted
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
Tutte le issue di FreeRTOS/coreMQTT
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 63/100
FreeRTOS/FreeRTOS-Plus-TCP#1395 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
qoretechnologies/qore#8222 ·
I maintainer di solito rispondono entro 1 giorno
-
c easy first-contributor first-contributors good first issue help wanted up-for-grabs
Difficoltà 1/5 1-3 ore Idoneità per principianti 96/100
fork-commit-merge/fork-commit-merge#8696 ·
I maintainer di solito rispondono entro 1 giorno