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

Unsubscribe shared subscriptions #799

Merged

Conversation

andsel
Copy link
Collaborator

@andsel andsel commented Dec 22, 2023

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 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

  • My code follows the style guidelines of this project
  • 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
  • I have updated the Changelog if it's a feature or a fix that has to be reported

Related issues

@andsel andsel added the mqtt5 label Dec 22, 2023
@andsel andsel self-assigned this Dec 22, 2023
@andsel andsel mentioned this pull request Dec 22, 2023
6 tasks
@andsel andsel force-pushed the feature/unsubscribe_shared_subscriptions branch from a6f67e1 to a602e97 Compare December 22, 2023 16:15
@andsel andsel merged commit 5343761 into moquette-io:main Dec 22, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant