eclipse / paho.mqtt.java

Eclipse Paho Java MQTT client library. Paho is an Eclipse IoT project.
https://eclipse.org/paho
Other
2.1k stars 880 forks source link

Add support for timeout callbacks #967

Open SchillingSebastian opened 1 year ago

SchillingSebastian commented 1 year ago

Please fill out the form below before submitting, thank you!

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). 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.