-
Notifications
You must be signed in to change notification settings - Fork 1
#69 Improve publish delivering to subscribers part 5 #139
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
Conversation
…livering-to-subscribers
…-publish-delivering-to-subscribers-part-2
…livering-to-subscribers-part-2 # Conflicts: # 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 # core-service/src/main/java/javasabr/mqtt/service/publish/handler/impl/TrackableMqttPublishOutMessageHandler.java # core-service/src/main/java/javasabr/mqtt/service/session/impl/InMemoryProcessingPublishes.java
…improve-publish-delivering-to-subscribers-part-3
…livering-to-subscribers-part-3 # Conflicts: # network/src/main/java/javasabr/mqtt/network/message/out/PublishReleaseMqtt311OutMessage.java
…improve-publish-delivering-to-subscribers-part-4
…livering-to-subscribers-part-4
…improve-publish-delivering-to-subscribers-part-5
…nt-flow-control-part-5 # Conflicts: # core-service/src/main/java/javasabr/mqtt/service/message/handler/impl/PublishMqttInMessageHandler.java
Test Coverage Report
|
…nt-flow-control-part-5
…nt-flow-control-part-5
| return true; | ||
| } else if (!(message instanceof PublishReleaseMqttInMessage release)) { | ||
| log.warning(networkUser.clientId(), message, "[%s] Not expected message:[%s]"::formatted); | ||
| log.warning(clientId, message.messageType(), "[%s] Not expected message:[%s]"::formatted); |
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.
Could we consider renaming messageType() -> type()?
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.
@crazyrokr for me it looks logically:

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.
Okay, but message.messageType() doesn't look nice
| publishOutHandler.handle(testPublish, subscriber) | ||
| then: | ||
| result == PublishHandlingResult.SUCCESS | ||
| def publish = user.nextSentMessage(PublishMqtt5OutMessage) |
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.
It looks like this variable should be renamed from publish to message or even actualSentMessage to avoid confusion with instances of Publish.
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.
@crazyrokr, and what are the names for publish received, publish released and publish ack messages then?
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.
publishMessage, publishAckMessage, etc.
| publishOutHandler.handle(testPublish, subscriber) | ||
| then: | ||
| result == PublishHandlingResult.SUCCESS | ||
| def publish = user.nextSentMessage(PublishMqtt5OutMessage) |
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.
The same as the previous comment. Please check all tests below.
#69
Description