[ISSUE #9634] Improve BrokerContainer extensibility and module structure#9635
Merged
RongtongJin merged 6 commits intoapache:developfrom Sep 9, 2025
Merged
Conversation
This commit enhances the BrokerContainer module to improve code structure and logging capabilities: Key improvements: - Polish the code structure to make BrokerContainer more extensible - Improve container logging configuration and management - Enhance BrokerBootHook for better hook management - Update BrokerContainer and BrokerContainerProcessor for improved functionality - Remove unused BrokerLogbackConfigurator to reduce complexity - Update BrokerStartup and BrokerController for better container integration Modified files: - broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java - broker/src/main/java/org/apache/rocketmq/broker/BrokerStartup.java - container/src/main/java/org/apache/rocketmq/container/BrokerBootHook.java - container/src/main/java/org/apache/rocketmq/container/BrokerContainer.java - container/src/main/java/org/apache/rocketmq/container/BrokerContainerProcessor.java - container/src/main/java/org/apache/rocketmq/container/BrokerContainerStartup.java - container/src/main/java/org/apache/rocketmq/container/logback/BrokerLogbackConfigurator.java (removed) This refactoring improves the overall maintainability and extensibility of the container module while maintaining backward compatibility.
This commit adds comprehensive unit tests for the BrokerContainer extensibility improvements introduced in this branch: Key test coverage: - BrokerBootHook system extensibility and proper hook execution - Container configuration accessibility and management - Container initialization and lifecycle management - BrokerContainerProcessor integration - Startup and shutdown sequence robustness - Extension points and customization capabilities These tests ensure that the improved BrokerContainer architecture maintains backward compatibility while providing enhanced extensibility for future development and customization.
707da35 to
768b4f3
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #9635 +/- ##
=============================================
- Coverage 48.17% 48.06% -0.11%
+ Complexity 12088 12083 -5
=============================================
Files 1313 1313
Lines 92837 92929 +92
Branches 11868 11870 +2
=============================================
- Hits 44721 44667 -54
- Misses 42622 42738 +116
- Partials 5494 5524 +30 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
guyinyou
approved these changes
Aug 28, 2025
- Add //auth dependency to container target in BUILD.bazel - Add //auth dependency to tests target in BUILD.bazel - Fixes compilation errors for AuthConfig class usage - Resolves Bazel build failures in container module Fixes: symbol not found org.apache.rocketmq.auth.config.AuthConfig
ltamber
approved these changes
Sep 9, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which Issue(s) This PR Fixes
Fixes #9634
Brief Description
This pull request improves the BrokerContainer module's extensibility, code structure, and logging capabilities. The changes enhance the module's maintainability while preserving full backward compatibility.
Key Improvements:
🔧 Extensibility Enhancements:
📋 Code Structure Improvements:
🗂️ Logging Enhancements:
📊 Comprehensive Testing:
Modified Components:
Backward Compatibility: ✅ All existing APIs and functionality remain unchanged
How Did You Test This Change?
Comprehensive Testing Strategy:
Unit Testing (439 new lines of test code):
Functional Testing:
Integration Testing:
Compilation and Build Testing:
Regression Testing:
Test Coverage Highlights:
The extensive test suite ensures that these improvements maintain system reliability while providing the enhanced extensibility and maintainability benefits.