fusesource / mqtt-client

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

this is a great library, I like it so much, and I want to offer some advices #96

Open kelinZhou opened 6 years ago

kelinZhou commented 6 years ago

hello this is a great library, I like it so much, and I want to offer some advices

  1. method that set reconnceting after disconnect sometimes doesn't work, no matter the disconnection happens the first time or later. For instance, when another session who has the same clientId as yours connect to the server, you will be logged out, in this case, if I set reconnection attempts no to 0, rapid reconnections emmits after every disconnection happens. I hope this could be fixed soon.

  2. When there is a persistent connection with server, connection.connect() crashes when invoked. This is not a good experience, wish this could be noticed by onFailure in callback instead of crush immediately.

  3. Method that could get current api is anticipated, for instance, isConnecting, isSuccessfullyConnected, and so forth. Beacause sometimes method connect doesn't instantly connect successfully after it is invoked(maybe some delay), this is the moment crush happens if connect is invoked again, so I wish similiar api could be provided

Thanks for your selfless contribution