Context
The current MQTT reconnect helper retries whenever publish/connect logic reaches it. If the broker is unavailable, this can cause overly aggressive reconnect attempts.
Scope
Add bounded reconnect backoff to the MQTT sender.
Suggested behavior
- Track the last reconnect attempt timestamp.
- Only retry every 2-5 seconds while disconnected.
- Keep
mqttClient.loop() running when connected.
- Do not block heartbeat or temperature sampling.
Acceptance criteria
- Broker-down scenarios do not spam reconnect attempts every main loop.
- Serial logs remain useful but not noisy.
- Telemetry resumes automatically when broker connectivity returns.
- A/B heartbeat and failover logic remain responsive while MQTT is down.
Context
The current MQTT reconnect helper retries whenever publish/connect logic reaches it. If the broker is unavailable, this can cause overly aggressive reconnect attempts.
Scope
Add bounded reconnect backoff to the MQTT sender.
Suggested behavior
mqttClient.loop()running when connected.Acceptance criteria