-
Notifications
You must be signed in to change notification settings - Fork 265
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add a `shutdown_rx` parameter to the `start` function to receive shutdown signals. - Handle the shutdown signal in the main loop and break out cleanly. - console.rs: - Add a `shutdown_rx` parameter to the `start` function to receive shutdown signals. - Use `axum::serve` with `with_graceful_shutdown` to handle shutdown signals. - timer.rs: - Add a `shutdown_rx` parameter to the `start` function to receive shutdown signals. - Handle the shutdown signal in the main loop and break out cleanly. - broker.rs: - Add a `shutdown_rx` and `shutdown_tx` to the `Broker` struct for shutdown handling. - Pass the `shutdown_rx` to various components like bridge, console, timer, and servers. - Handle shutdown signals in the server's main loop and break out cleanly. - Add a `ShutdownHandler` and `ShutdownDropGuard` for managing shutdown signals. These changes allow for graceful shutdown of the rumqtt broker and its components, ensuring clean termination and resource cleanup when a shutdown signal is received.
- Loading branch information
1 parent
819d4e3
commit 74ce72d
Showing
4 changed files
with
165 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.