Skip to content

Conversation

@JavaSaBr
Copy link
Owner

@JavaSaBr JavaSaBr commented Dec 10, 2025

#69

Description

  1. Remove subscription service from PublishOut handlers
  2. Remove PublishHandlingResult from PublishDeliveringService because no any sense in exposing it and no any option to handle it externally

…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
…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
@JavaSaBr JavaSaBr requested a review from crazyrokr December 10, 2025 17:39
@JavaSaBr JavaSaBr self-assigned this Dec 10, 2025
@github-actions
Copy link

github-actions bot commented Dec 10, 2025

@JavaSaBr JavaSaBr added the core label Dec 11, 2025
@JavaSaBr JavaSaBr added protocol enhancement New feature or request and removed protocol labels Dec 12, 2025
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);
Copy link
Collaborator

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()?

Copy link
Owner Author

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

Copy link
Collaborator

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)
Copy link
Collaborator

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.

Copy link
Owner Author

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?

Copy link
Collaborator

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)
Copy link
Collaborator

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.

@JavaSaBr JavaSaBr merged commit a990200 into develop Dec 14, 2025
6 checks passed
@JavaSaBr JavaSaBr deleted the feature/69-implement-flow-control-part-5 branch December 14, 2025 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants