title: MQTT messages persists after unsubscription and is recieved on subscribing again
body: <p>My app uses paho mqtt library on android to subscribe to a list of topics. On logging into the app subscription is made and on Logout unsubscribes topics. QoS is set to 1 at subscription. </p>
  
  <p>Once I login the next time I get all the mqtt messages that were published by the broker after I had unsubscribed.</p>
  
  <p>The callback on unsubscribe tells unsubscription was successful. 
  As far as I know once I unsubscribe I'm not supposed get any message after that.</p>
  
  <p>Here is my doConnect() for making the connection and Subscribing</p>
  
  <pre><code>   private void doConnect() {
              Log.d(TAG, "doConnect()");
              IMqttToken token;
              MqttConnectOptions options = new MqttConnectOptions();
              options.setCleanSession(false);
              options.setKeepAliveInterval(30);
              try {
              mqttClient = new MqttAsyncClient(tcp_server_URL, deviceId, new MemoryPersistence());
  
              token = mqttClient.connect(options);
              token.waitForCompletion(3500);
              mqttClient.setCallback(new MqttEventCallback());
              //changed single subscription of each topic to mass subscription
              // using String [] of Topics and int [] of QoS
  
              if (channelList != null) {
              channelListStringArray= new String[channelList.size()];
              channelListQosStringArray= new int[channelList.size()];
              for (int i = 0; i &lt; channelList.size(); i++) {
              // creating String Array of topics and int Array of QoS
              channelListStringArray [i] = "account/" + channelList.get(i);
              channelListQosStringArray [i] = 1;
              }
              //subscribe all channels by passing all topics as String Array and QoS int array
              token = mqttClient.subscribe(channelListStringArray, channelListQosStringArray);
              token.waitForCompletion(3500);
              }
  
              } catch (MqttSecurityException e) {
              e.printStackTrace();
              } catch (MqttException e) {
              switch (e.getReasonCode()) {
              case MqttException.REASON_CODE_BROKER_UNAVAILABLE:
              case MqttException.REASON_CODE_CLIENT_TIMEOUT:
              case MqttException.REASON_CODE_CONNECTION_LOST:
              case MqttException.REASON_CODE_SERVER_CONNECT_ERROR:
              Log.v(TAG, "c" + e.getMessage());
              e.printStackTrace();
              break;
              case MqttException.REASON_CODE_FAILED_AUTHENTICATION:
              Intent i = new Intent("RAISEALLARM");
              i.putExtra("ALLARM", e);
              Log.e(TAG, "b" + e.getMessage());
              break;
              default:
              Log.e(TAG, "a" + e.getMessage());
              }
              }
              }
  </code></pre>
  
  <p>Here is my onDestroy where I unsubscribe and disconnect</p>
  
  <pre><code>    public void onDestroy() {
              super.onDestroy();
              //disconnect from mqtt server
              IMqttToken token;
              try {
              if (channelList != null) {
              channelListStringArray = new String[channelList.size()];
              for (int i = 0; i &lt; channelList.size(); i++) {
              //creating array of topics
              channelListStringArray[i] = "account/" + channelList.get(i);
              }
              //unsubscribe MQTTClient by passing String array of Topics, NULL, mqttActionListener to get CallBack
              //on success or failure of unsubscription
              token = mqttClient.unsubscribe(channelListStringArray, getApplicationContext(), mqttActionListener);
              token.waitForCompletion(3500);
              }
              //Disconnect MqttCient
              token = mqttClient.disconnect();
              token.waitForCompletion(3500);
              } catch (MqttException e) {
              e.printStackTrace();
              }
              unregisterReceiver(broadcastReceiver);
              }
  </code></pre>
  
  <p>Is the issue due to app unsubscribing incorrectly?</p>