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

Adds subscription id into published messages back to susbscriber #807

Merged

Conversation

andsel
Copy link
Collaborator

@andsel andsel commented Jan 13, 2024

Release notes

Adds subscription identifier as property in the published message back to the subscriber.

What does this PR do?

  • Updates the serialization/deserialization of PublishedMessages in H2 and in segmented persistent queues to store and load MQTT properties, so that from a stored message with properties in queue then a PUBLISH messages could be recreated.
  • Updates the createPublishMessage method factory in MQTTConnection to accept an optional list of MQTT properties to attach to the PUBLISH message.
  • Updates PostOffice to send retained and non retained PUBLISH messages with subscriptionIdentifier MQTT property stored in the Subcription.
  • Moved sendPublishQos0 method from MQTTConnection to Session where others sendPublishQos1 and sendPublishQos2 already resides.
  • Added integration test to proof the publish with subscription identifier on both retained and non retained cases.

Why is it important/What is the impact to the user?

Implements the final step to manage subscription identifier.

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)
  • 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 Jan 13, 2024
@andsel andsel self-assigned this Jan 13, 2024
@andsel andsel mentioned this pull request Jan 13, 2024
4 tasks
@andsel andsel marked this pull request as ready for review January 19, 2024 14:57
@andsel andsel changed the title Feature/add subscription id into published msg Adds subscription id into published messages back to susbscriber Jan 19, 2024
@andsel andsel force-pushed the feature/add_subscription_id_into_published_msg branch from e981150 to 436fb8c Compare January 19, 2024 15:58
@andsel andsel merged commit 4973627 into moquette-io:main Jan 19, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant