Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QoS 1 and 2 improvements #142

Open
vietj opened this issue Jul 10, 2019 · 1 comment
Open

QoS 1 and 2 improvements #142

vietj opened this issue Jul 10, 2019 · 1 comment

Comments

@vietj
Copy link
Contributor

vietj commented Jul 10, 2019

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
Copy link
Contributor Author

vietj commented Jul 10, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant