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

QoS 1 and 2 improvements

Open vietj opened this issue 5 years ago • 1 comments

Currently the implementation handles differently QoS 1 and 2 differently on the client and server

  • the server will simply dispatch messages to the handlers and let the application be responsible to send publish messages and handle the corresponding state.
  • the client will handle this automatically for the application.

Here is one proposal to enhance the implementations

  • remove from the client the state handling with the maps and encapsulate this in an class that maintains this state
  • make this class also usable on the server

So in short, on the client, the developer would need to instantiate this state machine and set the corresponding handlers of the client with this state machine. The same would work on the server.

This would provide more control on the client about the acknowledgements (i.e it is not simply done by hashmaps) and provide more flexibility for custom implementations (persistence).

vietj avatar Jul 10 '19 06:07 vietj

cc @ppatierno let me know what you think of this proposal

vietj avatar Jul 10 '19 06:07 vietj