Mqtt, Coap.
built-in mechanism to handle sudden disconnections. If a client disconnects ungracefully, a pre-defined “last will message” will be published. Retention of Messages: MQTT retains the most recent message on a topic, providing it to any new subscribers to that topic. This is useful in situations