keepalive
The longest a client promises to stay silent; it sends a ping if it has nothing else to say.
The keepalive interval, set at CONNECT, is the maximum gap between packets from the client; it sends PINGREQ when idle, and the broker treats about 1.5 × keepalive of silence as a dead connection, which fires the last will.
Examples
A sensor with a keepalive of 30 s whose battery dies at 10:00:00 is declared gone by 10:00:45, 1.5 times the keepalive later.
With keepalive 60 s a quiet sensor sends 60 pings an hour; with 300 s it sends 12 but may take 450 s to be noticed.
See also