Handle QoS2 messages when the library loses state - store state in NVM
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 15/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- c
- Lĩnh vực
- embedded-iot, networking
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- C
- Star
- 239
- Fork
- 131
- Merge trung bình
- 6 giờ 51 phút
- Pull request đã merge (30 ngày)
- 6
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của FreeRTOS/coreMQTT
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 32/100
-
PUBCOMP rejected with MQTTIllegalState after reconnect replays a stored PUBRELCó thể đã có người làm @LogikerKit đã nhận 25 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 56/100
-
coreMQTT State Access AuditĐang mởhelp wanted
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
Tất cả issue của FreeRTOS/coreMQTT
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 63/100
FreeRTOS/FreeRTOS-Plus-TCP#1395 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
qoretechnologies/qore#8222 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
c easy first-contributor first-contributors good first issue help wanted up-for-grabs
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 96/100
fork-commit-merge/fork-commit-merge#8696 ·
Maintainer thường phản hồi trong vòng 1 ngày