-
Notifications
You must be signed in to change notification settings - Fork 1
[broker-30] Implement delivering retained messages #54
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
Open
crazyrokr
wants to merge
46
commits into
develop
Choose a base branch
from
feature-broker-30
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JavaSaBr
reviewed
Nov 19, 2025
model/src/main/java/javasabr/mqtt/model/topic/tree/ConcurrentTopicTree.java
Outdated
Show resolved
Hide resolved
model/src/main/java/javasabr/mqtt/model/topic/tree/TopicMessageNode.java
Outdated
Show resolved
Hide resolved
# Conflicts: # model/src/main/java/javasabr/mqtt/model/subscriber/tree/ConcurrentRetainedMessageTree.java # model/src/main/java/javasabr/mqtt/model/subscriber/tree/ConcurrentSubscriberTree.java # model/src/main/java/javasabr/mqtt/model/subscriber/tree/RetainedMessageNode.java # model/src/main/java/javasabr/mqtt/model/subscriber/tree/SubscriberNode.java # model/src/main/java/javasabr/mqtt/model/subscriber/tree/SubscriberTreeBase.java # model/src/main/java/javasabr/mqtt/model/subscribtion/tree/ConcurrentSubscriptionTree.java # model/src/main/java/javasabr/mqtt/model/subscribtion/tree/TopicFilterNode.java # model/src/main/java/javasabr/mqtt/model/subscribtion/tree/TopicFilterTreeBase.java # model/src/main/java/javasabr/mqtt/model/topic/tree/ConcurrentTopicTree.java # model/src/main/java/javasabr/mqtt/model/topic/tree/TopicNode.java # model/src/main/java/javasabr/mqtt/model/topic/tree/TopicTreeBase.java # model/src/test/groovy/javasabr/mqtt/model/topic/tree/SubscriberTreeTest.groovy # service/src/main/java/javasabr/mqtt/service/impl/InMemorySubscriptionService.java
24664c4 to
01bac5b
Compare
# Conflicts: # application/src/main/java/javasabr/mqtt/broker/application/config/MqttBrokerSpringConfig.java # core-service/src/main/java/javasabr/mqtt/service/impl/InMemorySubscriptionService.java # core-service/src/test/groovy/javasabr/mqtt/service/message/handler/impl/SubscribeMqttInMessageHandlerTest.groovy
# Conflicts: # core-service/src/main/java/javasabr/mqtt/service/SubscriptionService.java # core-service/src/main/java/javasabr/mqtt/service/impl/InMemorySubscriptionService.java # core-service/src/main/java/javasabr/mqtt/service/publish/handler/impl/AbstractMqttPublishOutMessageHandler.java # core-service/src/main/java/javasabr/mqtt/service/publish/handler/impl/PersistedMqttPublishOutMessageHandler.java # core-service/src/main/java/javasabr/mqtt/service/publish/handler/impl/Qos0MqttPublishOutMessageHandler.java # core-service/src/main/java/javasabr/mqtt/service/publish/handler/impl/Qos1MqttPublishOutMessageHandler.java # core-service/src/main/java/javasabr/mqtt/service/publish/handler/impl/Qos2MqttPublishOutMessageHandler.java
4d8e497 to
57eeb77
Compare
# Conflicts: # application/src/main/java/javasabr/mqtt/broker/application/config/MqttBrokerSpringConfig.java # core-service/src/test/groovy/javasabr/mqtt/service/IntegrationServiceSpecification.groovy
JavaSaBr
reviewed
Dec 10, 2025
core-service/src/main/java/javasabr/mqtt/service/impl/DefaultRetainMessageService.java
Outdated
Show resolved
Hide resolved
core-service/src/main/java/javasabr/mqtt/service/impl/DefaultRetainMessageService.java
Show resolved
Hide resolved
core-service/src/main/java/javasabr/mqtt/service/impl/InMemorySubscriptionService.java
Outdated
Show resolved
Hide resolved
| @Nullable | ||
| public SingleSubscriber subscribe(MqttUser user, Subscription subscription) { | ||
| return rootNode.subscribe(0, user, subscription, subscription.topicFilter()); | ||
| public SingleSubscriber subscribe(SingleSubscriber subscriber) { |
Owner
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you break the abstraction
Collaborator
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe SingleSubscriber has to be created by SubscriptionService, not by SubscriberTree
model/src/main/java/javasabr/mqtt/model/topic/tree/RetainedMessageNode.java
Outdated
Show resolved
Hide resolved
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Initial implementation of retain message feature
3 MQTT Control Packets
└ 3.3 PUBLISH – Publish message
└ 3.3.1 PUBLISH Fixed Header
└ 3.3.1.3 RETAIN
retainAsPublished=0then RETAIN flag is set to 0 in the forwarder publish message