on-internet
← Community

MQTT over multiple threads

Stack Overflow ·

I am trying to create a Python script that, upon receiving a message from an HTTP server, redirects this message to an MQTT broker. I have created the mqtt broker through amqtt, and I am using the same library in this project to run a publisher. import asyncio import logging import time import threading from MessageInterface import MessageInterface,MessageType, HearthBeatMessage from amqtt.client import MQTTClient from amqtt.errors import ClientError, ConnectError from amqtt.mqtt.constants import QOS_1, QOS_2, QOS_0 class MQTTNEXSOSClient: def item_added(uselessself, client, msg): asyncio.run(

Comments

Sign in or sign up to comment and upvote.

No comments yet.