Not an answer, but I also wanted to point out:
Related posts:
- Using Paho-MQTT in streamlit
- Real time data update (using mqtt) - #2 by dataprofessor
- How to stop a MQTT subscription with a button while keeping my data?
- Live plot from a thread - #2 by thiago