[
https://issues.apache.org/jira/browse/ARTEMIS-966?focusedWorklogId=877619&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-877619
]
ASF GitHub Bot logged work on ARTEMIS-966:
------------------------------------------
Author: ASF GitHub Bot
Created on: 22/Aug/23 19:30
Start Date: 22/Aug/23 19:30
Worklog Time Spent: 10m
Work Description: 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.
Issue Time Tracking
-------------------
Worklog Id: (was: 877619)
Time Spent: 40m (was: 0.5h)
> MQTT Session States do not survive a reboot
> -------------------------------------------
>
> Key: ARTEMIS-966
> URL: https://issues.apache.org/jira/browse/ARTEMIS-966
> Project: ActiveMQ Artemis
> Issue Type: Improvement
> Components: MQTT
> Reporter: Martyn Taylor
> Priority: Major
> Time Spent: 40m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)