first, apollo starts normally
python code, very simple:
import time
import paho.mqtt.client as mqtt
def on_connect(client, userdata, flags, rc):
print("Connected with result code " + str(rc))
if __name__ == "__main__":
client = mqtt.Client()
client.username_pw_set(username="admins",password="password")
client.on_connect = on_connect
client.connect("127.0.0.1", 61613, 60)
client.loop_start()
-sharpwhile True:
time.sleep(1)
client.publish(topic="message", payload="hello")
python2.7 compiler, error after running
Connected to pydev debugger (build 173.4674.37)
[Errno 10054]
Exception in thread Thread-6 (most likely raised during interpreter shutdown):
Process finished with exit code 0