mqtt-cli icon indicating copy to clipboard operation
mqtt-cli copied to clipboard

Refactor MQTT handling

Open gitseti opened this issue 2 years ago • 0 comments

Additional behavior changes:

  • Removed the connect check, which returns a client directly when it’s already connected because it prevents users to do session takeovers in the shell. Instead they should use the switch command.
  • When using multiple topics in the subscribe command, then only one subscribe is send instead of one subscribe for each topic.
  • Remove shutdown hooks, so that client connections can be interrupted without the standard disconnect behavior -> On shell exit and subscribe interrupt the disconnect behavior stays the same
  • Switch now can be used by only providing the client
  • Improved publish command: multiple publishes by using multiple topics are now truly async instead of waiting for completion after each publish
  • Failing and successful disconnects are now logged
  • If the the will topic is missing connecting clients will now fail with an IllegalArgumentException instead of just logging a warning

TODO:

  • [ ] Unit Tests
  • [ ] Check all open TODO comments

gitseti avatar Feb 05 '23 18:02 gitseti