eclipse-paho / eclipse-paho/paho.mqtt.java
Add support for timeout callbacks
- Dominant language
- Java
- Stars
- 2.3k
- Forks
- 919
- PR merge metrics
- No merged PRs in 30d
Description
Please fill out the form below before submitting, thank you!
- [x] Bug exists Release Version 1.2.5 ( Master Branch)
- [x] Bug exists in MQTTv3 Client on Snapshot Version 1.2.6-SNAPSHOT (Develop Branch)
- [ ] Bug exists in MQTTv5 Client on Snapshot Version 1.2.6-SNAPSHOT (Develop Branch)
Currently, if there is a timeout for a MQTT, the client thread simply logs a message on level `severe` and afterwards throws a `MqttEception` (e.g. [here](https://github.com/eclipse/paho.mqtt.java/blob/f4e0db802a4433645ef011e711646a09ec9fae89/org.eclipse.paho.client.mqttv3/src/main/java/org/eclipse/paho/client/mqttv3/internal/ClientState.java#L750)). This exception type is "harder" to handle, as it is thrown on multiple occasions.
It would be nice if the client could provide callback options and only throw when the callback is not provided. Somewhat similar to e.g. the `IMqttActionListener`.
Contributor guide
Research direction
Start in org.eclipse.paho.client.mqttv3/internal/ClientState.java around the timeout handling linked in the issue, then review IMqttActionListener for the proposed callback pattern. Determine the callback API and when the existing MqttException should remain the fallback; done means timeout behavior is covered for the affected MQTT client path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100