emqx / emqx/flowsdk

[FEATURE] disallow session resume (cleanstart=false) if suback isn't received.

Open
#86 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
21
Forks
6
Avg merge
3h 5m
Merged PRs (30d)
1

Description

**Is your feature request related to a problem? Please describe.**
It is common problem that if transport get interrupted in the middle of sub and suback, the states if subscription is unkown to the client.

Such as
1. mqtt.sub sent by the client but isn't recvd by broker
2. mqtt.suback sent by the broker but hasn't recvd by the client.
3. mqtt.suback is negative sent by the broker but hasn't recvd by the client.

**Describe the solution you'd like**
If there are subscribe inflight (suback isn't recvd) , the client could not assume the state is in-sync with the broker.
Thus flowSDK shall not allow session resume with (clean-start=false) in auto reconnect.

**Describe alternatives you've considered**
flowSDK could send mqtt.sub after reconnect but this doesn't follow the spec as spec disallow resend mqtt.sub.
also the message during reconnect or client offline may get lost as the success of subscription is unknown to the client.

**Additional context**
Add any other context or screenshots about the feature request here.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.