I have many raspberry Pis monitoring temperature and humidity in real time and publishing the data continuously to an MQTT broker (I am using Mosquitto at the moment). The Raspberry pis are all publishing to different topics. I would then like to send all this data to a flask web server, as in this diagram:
But Obviously flask can't subscribe to MQTT topics. I was thinking I could add an additional MQTT client that would subscribe to the topics and then it could send the messages over to the server via an http request in the on_message callback. This client would probably be running as a process on the same machine.
Is there a better way to do this?