If the client and server are behaving i.e.
the client is either sending application messages or keepalive packets
and the server is responding appropriately then the connection should not
be closed! The only time the client will close the connection is
if it does not see an MQTT response within the keepalive period.
There was a problem if the client only sent QOS 0 messages which do next
get a response from the server where the client would kill the connection,
I believe this has been fixed.
In the test where the KA is set to 1
min is any application message sent or does the test just open the connection
and leave the client to keep the connection alive?
All the best
Oleg Pachkovets <oleg.pts@xxxxxxxxx>
discussions for paho project <paho-dev@xxxxxxxxxxx>
alive treatment on the Paho Java client
The java client closes the socket when KeepAlive time
interval has expired.
As my understanding of the MQTT speck, the client shall
send the ping request to the Server within the KeepAlive time interval
if no data was sent by the application.
By doing that the connection will be kept open until it
will be closed proactively by the client application or by the server.
On the today's Paho Java implementation I see that if
I set the KeepAlive to e.g. 1 minute the connection is being closed after
1 minute automatically, so i need to reopen it again.
Do you have any opinion if this is a bug or a feature