Implemented the unsubscribe for shared subscriptions.
What does this PR do?
Updates the CTrie.removeSubscriptionsFor to accept an UnsubscribeRequest instead of simple parameters, customizing the method to handle a shared subscription's unsubscribe request.
Adds a method removeSharedSubscriptionsForClient to remove in one step all the shared subscriptions of a session, in doing so it introduces a mapping cache clientId -> list of subscription to avoid a full tree traversal.
Why is it important/What is the impact to the user?
Implements part of MQTT5 shared subscription feature
Checklist
[x] My code follows the style guidelines of this project
[x] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] I have made corresponding change to the default configuration files (and/or docker env variables)
[ x I have added tests that prove my fix is effective or that my feature works
[x] I have updated the Changelog if it's a feature or a fix that has to be reported
Release notes
Implemented the unsubscribe for shared subscriptions.
What does this PR do?
Updates the
CTrie.removeSubscriptionsFor
to accept an UnsubscribeRequest instead of simple parameters, customizing the method to handle a shared subscription's unsubscribe request. Adds a methodremoveSharedSubscriptionsForClient
to remove in one step all the shared subscriptions of a session, in doing so it introduces a mapping cache clientId -> list of subscription to avoid a full tree traversal.Why is it important/What is the impact to the user?
Implements part of MQTT5 shared subscription feature
Checklist
[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration files (and/or docker env variables)Related issues