Skip to content

Instantly share code, notes, and snippets.

@markembling
Created August 6, 2013 19:48
Show Gist options
  • Save markembling/6167946 to your computer and use it in GitHub Desktop.
Save markembling/6167946 to your computer and use it in GitHub Desktop.
Is something like this possible?
import mosquitto
client = mosquitto.Mosquitto("can-haz-msg")
client.connect("mqtt.example.com")
client.subscribe("my-topic")
for msg in client.wait_for_next_message():
print msg.payload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment