title: Unable to subscribe to multiple topics in mqtt
body: <p>I run a simple mqtt publisher c code that subscribe "Hello World".</p>
  
  <p>mqtt subscriber1:</p>
  
  <pre><code>mosquitto_sub -h xx.xx.xx.xx -t "mq_test" 
  </code></pre>
  
  <p>Consecutively i run the same mqtt publisher code in another location and subscribe with different topic to same host.</p>
  
  <p>mqtt subscriber2:</p>
  
  <pre><code>mosquitto_sub -h xx.xx.xx.xx -t "mq_t"
  </code></pre>
  
  <p>When i starts the second publisher program, first mqtt subscription stops.
  Why this issue occurs, i think it is possible to subscribe to multiple topics.</p>
  
  <p>mqtt publisher c code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;string.h&gt;
  #include &lt;MQTTClient.h&gt;
  #define ADDRESS     "tcp://xx.xx.xx.xx:abcd"
  #define CLIENTID    "ExampleClientPub"
  #define TOPIC       "mq_test" //"mq_t"
  #define PAYLOAD     "Hello World!"
  #define QOS         1
  #define TIMEOUT     10000L
  int main(int argc, char* argv[])
  {
      MQTTClient client;
      MQTTClient_connectOptions conn_opts = MQTTClient_connectOptions_initializer;
      int rc = 0;
      MQTTClient_create(&amp;client, ADDRESS, CLIENTID,
          MQTTCLIENT_PERSISTENCE_NONE, NULL);
      conn_opts.keepAliveInterval = 5;
      conn_opts.cleansession = 1;
      if ((rc = MQTTClient_connect(client, &amp;conn_opts)) != MQTTCLIENT_SUCCESS)
      {
          printf("Failed to connect, return code %d\n", rc);
          exit(EXIT_FAILURE);
      }
      MQTTClient_message pubmsg = MQTTClient_message_initializer;
      MQTTClient_deliveryToken token;
      while(1){
          rc = 0;
           pubmsg.payload = PAYLOAD;
          pubmsg.payloadlen = strlen(PAYLOAD);
          pubmsg.qos = QOS;
          pubmsg.retained = 0;
          MQTTClient_publishMessage(client, TOPIC, &amp;pubmsg, &amp;token);
          printf("Waiting for up to %d seconds for publication of %s\n"
              "on topic %s for client with ClientID: %s\n",
              (int)(TIMEOUT/1000), PAYLOAD, TOPIC, CLIENTID);
           rc = MQTTClient_waitForCompletion(client, token, TIMEOUT);
           printf("Message with delivery token %d[%d] delivered\n", token,rc);
      }
      MQTTClient_disconnect(client, 10000);
      MQTTClient_destroy(&amp;client);
      return rc;
  }
  </code></pre>