Skip to content

Implement exponential backoff/retry for reconnections #10

Closed
@brentru

Description

@brentru

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions