Closed jlgoasis closed 3 years ago
Yes, client.setKeepAlive()
should be called before client.begin()
. However, depending on your MQTT broker a default keep alive my still be applied (shiftr.io does for example).
And please, confirm if client.setKeppAlive(0) means MQTT client doesn't publishing any data
It will not send any ping packets, if that's what you mean.
Hi Joel,
Were is declared client.setKeepAlive(xx)? I tried in the void setup() after client.begin() but it doesn't work. Could you give an example, please.
Due I'm interested to avoid the keep alive mqtt messages, will client.setKeepAlive(0) do it?
Thank you