jbertram commented on code in PR #4583:
URL: https://github.com/apache/activemq-artemis/pull/4583#discussion_r1302101800


##########
artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTSessionState.java:
##########
@@ -91,8 +98,50 @@ public class MQTTSessionState {
 
    private Map<String, Integer> serverTopicAliases;
 
-   public MQTTSessionState(String clientId) {
+   public MQTTSessionState(String clientId, MQTTSessionStateManager 
stateManager) {
       this.clientId = clientId;
+      this.stateManager = stateManager;
+   }
+
+   /**
+    * This constructor deserializes session data from a message. The format is 
as follows.
+    *
+    *  - byte: version
+    *  - int: subscription count
+    *
+    *  There may be 0 or more subscriptions. The subscription format is as 
follows.
+    *
+    *  - String: topic name
+    *  - int: QoS
+    *  - boolean: no-local
+    *  - boolean: retain as published
+    *  - int: retain handling
+    *  - int (nullable): subscription identifier

Review Comment:
   The "subscription identifier" is a feature introduced in MQTT 5. It's a way 
to map the messages that the client receives to the subscription that was 
actually used to receive it. Null is a valid value as the ID is optional.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to