title: Getting Persistence Already in Use error from MQTT
body: <p>I am getting the following exception from the mqtt broker when I am trying to create a new MqttClient. The error is here ---</p>
  
  <pre><code>Caused by: Persistence already in use (32200)
  at org.eclipse.paho.client.mqttv3.persist.MqttDefaultFilePersistence.open(MqttDefaultFilePersistence.java:108) [mqtt-client-0.4.0.jar:]
  at org.eclipse.paho.client.mqttv3.MqttAsyncClient.&lt;init&gt;(MqttAsyncClient.java:273) [mqtt-client-0.4.0.jar:]
  at org.eclipse.paho.client.mqttv3.MqttClient.&lt;init&gt;(MqttClient.java:222) [mqtt-client-0.4.0.jar:]
  at org.eclipse.paho.client.mqttv3.MqttClient.&lt;init&gt;(MqttClient.java:134) [mqtt-client-0.4.0.jar:]
  at com.ericsson.asdp.virtualassist.notification.messaging.MQTTHandler.createClient(MQTTHandler.java:61) [classes:]
  at com.ericsson.asdp.virtualassist.notification.messaging.MQTTMessagingService.receieve(MQTTMessagingService.java:52) [classes:]
  ... 44 more 
  </code></pre>
  
  <p>Here is the code for my java class <code>receive()</code> method from where I am trying to connect to mqtt ---</p>
  
  <pre><code>MqttClient subClient = null;
  try {
      subClient = mqttHandler.createClient(userId, brokerURL);
      MQTTNotificationSubscriber notificationSub = new MQTTNotificationSubscriber(mqttHandler);
      notificationSub.setUserId(userId);
  
      subClient.setCallback(notificationSub);
      mqttHandler.subscribe(subClient, userId);
      // do something here
  } catch (Exception e) {
      logger.error("Error in receive " + e.getMessage());
          throw new VirtualAssistServicesException(e.getMessage(), e);
  }  finally {
      try {
          mqttHandler.disconnect(subClient);
      } catch (MqttException e) {
          throw new VirtualAssistServicesException(e.getMessage(), e);
      }
  }
  </code></pre>
  
  <p>And here is the MQTTHandler class <code>createClient()</code> method ---</p>
  
  <pre><code>MqttClient subClient = null;
  
  try {
      subClient = new MqttClient(brokerURL, clientId);
  
  } catch (MqttException e) {
  
  }
  </code></pre>
  
  <p>When I create the client for a userId first time it works. From second time onwards it fails with the above exception. I am using <code>clean-session=false</code> here.</p>
  
  <p>If anyone has any idea please let me know. Thanks.</p>