← Back to the chapter · Previous detail · Next detail →

Technical detail · MQTT Python: Reconnect and Backoff Timing

ESP32 handshake timeout units and connection evidence

TLS, Transport Layer Security, establishes a protected connection through a handshake whose timeout is separate from MQTT timing controls.

In Arduino ESP32 core 3.3.2, NetworkClientSecure.setHandshakeTimeout() takes seconds, while the implementation stores milliseconds. MQTT keepalive, the interval used to check a connection’s continued activity, and PubSubClient socket waiting are separate controls. Changing publish QoS, the MQTT delivery assurance level, does not shorten the TLS handshake that precedes MQTT. Keep identity checks and transport protection while testing the measured cause.

The example ESP32 reconnect sketch uses a plain client on port 1883. It supplies retry and callback control flow, where a callback is a registered event handler, rather than evidence of a protected connection. Its source review is separate from a TLS timing measurement.

← Back to the chapter · Previous detail · Next detail →