title: Using Paho's message_callback_add() function, but no results
body: <p>I am attempting to catch messages by topic by using the message_callback_add() function in <a href="https://pypi.python.org/pypi/paho-mqtt#usage-and-api" rel="nofollow">this library</a>.  Below is my entire module that I am using to deal with my mqtt subscribe and publishing needs.  I have been able to test that the publish works, but I can't seem to catch any incoming messages.  There are no warnings/errors of any kind and the <code>print("position")</code> statements are working for 1 and 2 only.</p>
  
  <pre><code>import sys
  import os
  import time
  import Things
  import paho.mqtt.client as paho
  
  global mqttclient;
  global broker;
  global port;
  
  broker = "10.64.16.199";
  port = 1883;
  
  mypid = os.getpid()
  client_uniq = "pubclient_"+str(mypid)
  mqttclient = paho.Client(client_uniq, False) #nocleanstart
  mqttclient.connect(broker, port, 60)
  mqttclient.subscribe("Commands/#")
  
  def Pump_callback(client, userdata, message):
      #print("Received message '" + str(message.payload) + "' on topic '"
      #    + message.topic + "' with QoS " + str(message.qos))
      print("position 3")
      Things.set_waterPumpSpeed(int(message.payload))
  
  def Valve_callback(client, userdata, message):
      #print("Received message '" + str(message.payload) + "' on topic '"
      #    + message.topic + "' with QoS " + str(message.qos))
      print("position 4")
      Things.set_valvePosition(int(message.payload))
  
  mqttclient.message_callback_add("Commands/PumpSpeed", Pump_callback)
  mqttclient.message_callback_add("Commands/ValvePosition", Valve_callback)
  
  print("position 1")
  mqttclient.loop_start()
  print("position 2")
  
  
  def pub(topic, value):
    mqttclient.publish(topic, value, 0, True)
  </code></pre>