activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] michaelandrepearce commented on a change in pull request #2528: ARTEMIS-2226 last consumer connection should close the previous consu…
Date Fri, 01 Feb 2019 02:24:01 GMT
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message