AWS IoT Core now offers the DeleteConnection API, enabling programmatic disconnection of MQTT clients using their client IDs. This new capability helps enable developers to terminate MQTT connections with options to clear persistent sessions and suppress publication of Last Will and Testament messages—messages that the MQTT broker automatically publishes on a client’s behalf when it disconnects unexpectedly. Upon disconnection, the service generates lifecycle events, providing enhanced operational visibility into device connection states.
The DeleteConnection API helps developers manage device connectivity more effectively, whether redirecting devices across endpoints, troubleshooting connection issues, or handling problematic device behavior. The DeleteConnection API is now available in all AWS Regions where AWS IoT Core is supported. To learn more, visit the AWS IoT Core documentation and AWS IoT Core API reference guide.
Source:: Amazon AWS