MQTT-Client-Framework stay running at background

Viewed 6013

I'm trying to connect to our push server via MQTT-Client-Framework.

There is no complication for connecting to server and with a few line of code i can connect to server and subscribe to topic.

but I have a few question that I could not find any direct answer for them.

1) How can I keep my client running at background?

2) What happen after device restart? how can I automatically connect to server after device restart?

3)Suppose I got an error during connecting to server. Will this library trying to connect in a loop? how many times it try? or I need to manage this myself?

4) The same 3 scenario for subscribing to topic?

3 Answers
Related