Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Controller.Api.MQTT: reconnect on connection failure #2602

Merged
merged 22 commits into from
Jun 16, 2024

Commits on Feb 6, 2024

  1. Update ControllerApiMqttImpl.java to reconnect on Connection Failure

    After the initial connection attempt in the activate method, we schedule the attemptConnect method to be called periodically every 60 seconds. This ensures that if the MQTT client becomes disconnected for any reason (e.g., network issues, broker restarts), the system will automatically attempt to re-establish the connection at regular intervals.
    Sn0w3y authored Feb 6, 2024
    Configuration menu
    Copy the full SHA
    1924fd1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2dcdf6f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e4ffec3 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2016985 View commit details
    Browse the repository at this point in the history

Commits on Feb 7, 2024

  1. Configuration menu
    Copy the full SHA
    6a71b90 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    19172f0 View commit details
    Browse the repository at this point in the history
  3. Updating MQTT Controller

    Enhanced Lifecycle Management: Modified the component's initialization and shutdown processes. The ScheduledExecutorService, responsible for managing reconnection attempts, is now initialized in the component's constructor and configured in the @activate method. This ensures that the executor is ready for use immediately and adapts to configuration updates.
    
    Graceful Shutdown: Implemented a more graceful shutdown process using ThreadPoolUtils.shutdownAndAwaitTermination in the @deactivate method. This approach ensures that ongoing reconnection attempts are properly completed before the component is deactivated, preventing potential resource leaks.
    
    Configuration Update Handling: Introduced a @Modified method to dynamically handle configuration changes. This method allows the component to adjust its behavior, such as changing the reconnection attempt interval, without needing to be fully deactivated and reactivated.
    Sn0w3y authored Feb 7, 2024
    Configuration menu
    Copy the full SHA
    03485bc View commit details
    Browse the repository at this point in the history
  4. Update Config.java

    Dynamic Reconnection Interval: Added a new configuration parameter (reconnectionAttemptInterval) to the Config interface. This parameter allows users to specify the interval between reconnection attempts to the MQTT broker, enhancing the component's adaptability to network conditions or broker availability.
    Sn0w3y authored Feb 7, 2024
    Configuration menu
    Copy the full SHA
    272f125 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    56ddf4e View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    c6c00d6 View commit details
    Browse the repository at this point in the history
  7. Update Config.java

    Sn0w3y authored Feb 7, 2024
    Configuration menu
    Copy the full SHA
    05ff16d View commit details
    Browse the repository at this point in the history
  8. Update MyConfig.java

    Sn0w3y authored Feb 7, 2024
    Configuration menu
    Copy the full SHA
    052e5b2 View commit details
    Browse the repository at this point in the history
  9. Update MyConfig.java

    Sn0w3y authored Feb 7, 2024
    Configuration menu
    Copy the full SHA
    55b8581 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    be1e074 View commit details
    Browse the repository at this point in the history

Commits on Apr 1, 2024

  1. Configuration menu
    Copy the full SHA
    4490d7e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d7cb132 View commit details
    Browse the repository at this point in the history
  3. Formatting

    Sn0w3y committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    a40f94c View commit details
    Browse the repository at this point in the history
  4. Formatting

    Sn0w3y committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    a3d7922 View commit details
    Browse the repository at this point in the history

Commits on May 11, 2024

  1. Configuration menu
    Copy the full SHA
    7b834ab View commit details
    Browse the repository at this point in the history

Commits on Jun 16, 2024

  1. Configuration menu
    Copy the full SHA
    0fb32a3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e11990d View commit details
    Browse the repository at this point in the history
  3. General cleanup

    sfeilmeier committed Jun 16, 2024
    Configuration menu
    Copy the full SHA
    1fb3a17 View commit details
    Browse the repository at this point in the history