Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Refactoring and indefinite reconnect (v1.0.0) #14

Merged
merged 10 commits into from
Dec 18, 2021

Conversation

mjmeli
Copy link
Owner

@mjmeli mjmeli commented Dec 16, 2021

Somewhat larger realtime factoring plus improvements to support more graceful error handling and indefinite reconnecting

A highlight of realtime client changes include

  • Breaking Update external interface by renaming callback functions to be fully named (e.g. on_msg -> on_message). This is a breaking change and the main reason for a major version update.
  • Create a new MqttError class that will wrap MQTT related exceptions, and make sure these exceptions are thrown in failure instances as opposed to suppressing them
  • Update connect_and_subscribe to be callable multiple times
  • Implement connect_and_subscribe_forever as a wrapper around connect_and_subscribe which will attempt to auto-recover from any disconnections with an exponential back-off strategy
  • Add new connected future which will trigger when on_connect is called. This allows us to do a timeout wait and detect when connection is never achieved.
  • Add more type hints to help with type safety
  • Miscellaneous linting fixes

Plus some changes to development

  • Run build and tests on pushes to all branches, not just main
  • Update tox file to handle deprecation errors

@mjmeli mjmeli force-pushed the refactoring-and-indefinite-reconnect branch from e5f124c to a24d0a9 Compare December 16, 2021 18:23
@mjmeli mjmeli changed the title Refactoring and indefinite reconnect Refactoring and indefinite reconnect (v1.0.0) Dec 16, 2021
@mjmeli mjmeli force-pushed the refactoring-and-indefinite-reconnect branch from 0b3a1f2 to cd407e2 Compare December 16, 2021 19:53
@mjmeli mjmeli merged commit b83a4f9 into main Dec 18, 2021
@mjmeli mjmeli deleted the refactoring-and-indefinite-reconnect branch December 18, 2021 13:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant