I’m building an Ionic app which has to interact with an MQTT broker.
My concern is: where is the best place to handle the MQTT client?
If i put it on a page, the result will be that the MQTT client will work only when the page is displayed, so some messages can be lost if are delivered while the page is not displayed.
Which is the best way to handle in an Ionic app something like that? Using a web worker could be a solution?