eclipse-paho / eclipse-paho/paho.mqtt.javascript
Reconnect on mobile devices
- Dominant language
- JavaScript
- Stars
- 1.2k
- Forks
- 466
- PR merge metrics
- No merged PRs in 30d
Description
I am using paho-mqtt with react-native on mobile devices. After the application enters the background state, the connection is broken. When the application resumes, the reconnect timeout is at a minimum value 1 seconds. But, missed messages begin to arrive after 60 second as keepAliveInterval default value.
Desired behavior.
After determining that the application has left the background or sleep state, immediately connect to the server and receive all pending messages.
Contributor guide
Research direction
Start by reproducing the connection loss and delayed message delivery in a React Native mobile app when it enters and leaves the background state. Read the reconnect timeout and keepAliveInterval handling in the paho-mqtt JavaScript client; done means resuming the app reconnects immediately and receives pending messages without waiting for the default 60-second keep-alive interval.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react-native
- Domain
- mobile-dev, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100