Welcome to the Streamlit community! This is a classic challenge—you’re not alone! Streamlit’s architecture doesn’t support calling Streamlit functions (like st.success or updating st.session_state) from threads outside the main script thread, which is exactly what happens with Paho MQTT’s on_message callback.