MemorySessionStore: Session class added

MemorySessionStore$Session: clientSession field added
MemorySessionStore#pendingAck: secondPhaseStore & inflightStore &
inboundFlightMeessageToGuid added

ClientSession#cleanup missed these messages
SubscriptionsDirectoryTest: fixed
SessionsStore#dropInFlightMessagesInSession: changed to cleanSession
This commit is contained in:
Andreas Mager
2017-06-02 18:09:23 +02:00
parent 46a215bd2c
commit fcb7870a38
7 changed files with 169 additions and 126 deletions
@@ -165,15 +165,7 @@ public class ClientSession {
}
public void cleanSession() {
LOG.info("Wiping existing subscriptions. ClientId={}", this.clientID);
subscriptionsStore.wipeSubscriptions(this.clientID);
// remove also the messages stored of type QoS1/2
LOG.info("Removing stored messages with QoS 1 and 2. ClientId={}", this.clientID);
m_sessionsStore.dropInFlightMessagesInSession(this.clientID);
//remove also the enqueued messages
this.m_sessionsStore.dropQueue(this.clientID);
m_sessionsStore.cleanSession(this.clientID);
}
public boolean isCleanSession() {