Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] Keep alive treatment on the Paho Java client

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
Dave

 



From:        Oleg Pachkovets <oleg.pts@xxxxxxxxx>
To:        General development discussions for paho project <paho-dev@xxxxxxxxxxx>
Date:        20/11/2013 09:41
Subject:        [paho-dev] Keep alive treatment on the Paho Java client
Sent by:        paho-dev-bounces@xxxxxxxxxxx




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 :)

Kind Regards
Oleg_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/paho-dev


Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU

Back to the top