michaelandrepearce commented on a change in pull request #2528: ARTEMIS-2226
last consumer connection should close the previous consu…
URL: https://github.com/apache/activemq-artemis/pull/2528#discussion_r252915242
##########
File path:
artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTSession.java
##########
@@ -204,4 +208,35 @@ public CoreMessageObjectPools getCoreMessageObjectPools()
{
public static Map<String, MQTTSessionState> getSessions() {
return new HashMap<>(SESSIONS);
}
+
+ public MQTTSessionState getSessionStateFromSessionMap(String clientId) {
+ return SESSIONS.get(generateSessionStateKey(clientId));
+ }
+
+ public void putSessionStateIntoSessionMap(String clientId, MQTTSessionState
state) {
+ SESSIONS.put(generateSessionStateKey(clientId), state);
+ }
+
+ public void removeSessionStateFromSessionMap(String clientId) {
+ SESSIONS.remove(generateSessionStateKey(clientId));
+ }
+
+ /**
+ * When performing cluster testing, different nodes of the cluster are
actually started in the same JVM process,
Review comment:
This is because we have state in a static, that is really bad, and simply
needs to be addressed, see other comment.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services