fusesource / mqtt-client

A Java MQTT Client
http://mqtt-client.fusesource.org/
Apache License 2.0
1.27k stars 369 forks source link

how to set timeout connection.connect() with CallbackConnection ? #82

Open l7810 opened 7 years ago

l7810 commented 7 years ago

How to set the timeout for connection.connect (new Callback () {}}); when using CallbackConnection without setting reconnect?

version 1.12

makerlee commented 4 years ago

MQTT mqtt = getMqtt(); futureConnection = mqtt.futureConnection(); futureConnection.connect().await(CONNECT_TIMEOUT, TimeUnit.SECONDS);