title: Reading subscribed MQTT messages after reconnect
body: <p>I am trying to read messages on a MQTT server. In some cases, the connection is unstable and requires to reconnect. But after reconnect, I am not able to receive any message from the topic that I previously subscribed to. I am using paho's python package to handle MQTT connection. Here is some code I am using</p>
  <pre class="lang-py prettyprint-override"><code>TopicName='some/topic/name'
  
  class Counter:
      def __init__(self, mqttClient):
          self.messages_recieved = 0
          self.mqttClient = mqttClient
          self.mqttClient.subscribe(TopicName)
          self.mqttClient.on_message = self.on_message
          self.mqttClient.on_disconnect = self.on_disconnect
          self.mqttClient.loop_start()
  
      def on_message(self, client, userdata, message):
          self.messages_received += 1
  
      def on_disconnect(self, client, userdata, rc):
          if rc != 0:
              print(&quot;Trying to reconnect&quot;)
              while not self.mqttClient.is_connected():
                  try:
                      self.mqttClient.reconnect()
                  except OSError:
                      pass
  </code></pre>
  <p>If my internet goes down, I am no longer able to receive messages. I have tried to subscribe again to the topic, also I have tried to call loop_start in the on_disconnect method, neither of those worked. Any solution would be helpful. Also to point out messages are being sent, I can see them in the browser on MQTT wall</p>