Currently a user logs in from my vue app which consumes a REST api. Once the user logs in I get a jwt token and get the user's information. I then store the user's info in pinia and persist state with local storage. After I get the user's information I need to initialize a MQTT client with the subscribers. Is it possible to make subscriptions after the on_connect function has been called. I have had trouble with this paho-mqtt in python. Please let me know if this is possible and how I can architect my application. Thank you.
I have tried initializing vue-mqtt in main.js but the subscriptions change base on who is logged in and thus doesn't work.