Closed
Description
To avoid placing load on MQTT servers like Adafruit IO, Google Cloud IoT Core, or Amazon AWS IOT, reconnections should add an optional flag for implementing an exponential backoff after failed reconnection attempts. This will also help avoid throttling errors from the server.
reconnect()
method: https://github.com/adafruit/Adafruit_CircuitPython_MiniMQTT/blob/master/adafruit_minimqtt.py#L585
See:
AWS Python Client implementation: https://github.com/aws/aws-iot-device-sdk-python#id4
AWS IoT Retries: https://docs.aws.amazon.com/general/latest/gr/api-retries.html
Google Cloud IoT Backoff: https://cloud.google.com/iot/docs/how-tos/exponential-backoff