* Use fastjson2 in all modules
* Update test
* Update test
* Update test
* Add serialization compatibility test tool class
* Update RemotingSerializableCompatTest.java
* Update RemotingSerializableCompatTest.java
* Update RemotingSerializableCompatTest.java
* Update BitSet problem
* Update
* Update
* Update test
* Update test
* Update BUILD.bazel
* Update BUILD.bazel
* Update test
* Update BitSet problem
* Add test
* Add compat test
* merge develop
* Update test
* merge develop
* refactor: convert RemotingMetricsManager from static to instance-based
- Remove all static global instance related code
- Convert all static methods to instance methods
- Remove static wrapper methods for backward compatibility
- Add constructor and getter/setter methods for instance variables
- This ensures each broker instance manages its own metrics in multi-broker scenarios
* refactor: convert PopMetricsManager from static to instance-based
- Remove all static global instance related code
- Convert all static methods to instance methods
- Remove static wrapper methods for backward compatibility
- Add constructor and getter/setter methods for instance variables
- This ensures each broker instance manages its own Pop metrics in multi-broker scenarios
* refactor: implement instance-based metrics management for multi-broker scenarios
- Add RemotingMetricsManager instance variable to NettyRemotingAbstract
- Add setter/getter methods for RemotingMetricsManager in NettyRemotingAbstract
- Update writeResponse method to use instance-based metrics recording
- Add writeResponse method to RemotingServer interface
- Update BrokerController to set RemotingMetricsManager on NettyRemotingServer instances
- Update InnerBrokerController to set RemotingMetricsManager on SubRemotingServer instances
- Update all processor classes to use instance-based writeResponse calls
- Update RocksDBStoreMetricsManager integration in DefaultStoreMetricsManager
- Remove unused imports and clean up code
This ensures each broker instance manages its own metrics independently,
solving the static variable conflict issue in multi-broker processes.
* refactor: fix test failures caused by metrics manager refactoring
- Fix ChangeInvisibleTimeProcessorTest by using @Spy instead of @Mock for BrokerController
- Inject BrokerMetricsManager into BrokerController using reflection
- Remove unnecessary mock stubbings
- Update all processors to use new static writeResponse method
- Fix BrokerMetricsManager initialization issues in AckMessageProcessorTest and PopReviveServiceTest
These changes ensure all related tests pass after refactoring metrics managers from static variables to instance variables.
* fix: resolve checkstyle errors and ensure compilation success
- Remove duplicate import in PopMessageProcessor.java
- Clean up unused imports in ChangeInvisibleTimeProcessorTest.java
- Clean up unused imports in AckMessageProcessorTest.java
- Ensure all modules compile successfully without checkstyle violations
These changes complete the metrics manager refactoring from static variables to instance variables, resolving statistical information conflicts in multi-broker processes.
* Fix PopReviveServiceTest by adding proper PopMetricsManager mock
- Add PopMetricsManager mock to PopReviveServiceTest
- Fix NullPointerException in reviveRetry method
- Ensure rePutCK method is called correctly when retry fails
- Test now passes successfully with proper metrics manager setup
* Remove debug code from PopReviveService
- Remove debug logging statements from reviveMsgFromCk method
- Clean up test output for better readability
* fix
* fix
* Optimize shutdown process and resource management
- Improve BrokerController shutdown flow for graceful shutdown
- Optimize BrokerStartup startup and shutdown logic
- Enhance ClientHousekeepingService resource cleanup
- Improve shutdown handling for various processors
- Optimize resource management in storage layer components
- Enhance lifecycle management for statistics manager
- Improve shutdown flow for timer components
* Fix this.popMessageProcessor.getPopLongPollingService() not shutdown
* Fix test shutdown state transition issue
- Add proper null checks and exception handling in test cleanup
- Prevent IllegalStateException during test teardown
- Ensure graceful test cleanup without state conflicts
* Fix DefaultMessageStoreCleanFilesTest can not pass
* Fix CombineConsumeQueueStoreTest can not pass
* Polish the code
* Polish the code
* Ignore flaky test first
* Initially optimize the broker container structure
* refactor: Improve BrokerContainer extensibility and logging
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.
* test: Add unit tests for BrokerContainer extensibility improvements
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.
* Fix testBrokerGracefulShutdown can not pass
* Fix BrokerContainerExtensibilityTest can not pass
* fix(container): add missing auth module dependency
- 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
* [ISSUE #7493] Introduce a new event NettyEventType.ACTIVE for ChannelEventListener
* introduce a new event NettyEventType.ACTIVE,
* implement channelActive interface for NettyRemotingClient#NettyConnectManageHandler
* add onChannelActive for ChannelEventListener interface.
* Move send heartbeat to onChannelActive
* Remove ClientLogger
* WIP
* WIP
* Rename logger to log
* Make it compile
* WIP
* Fix bazel to use shaded slf4j
* Fix DeleteExpiredCommitLogSubCommandTest
* Fix pom.xml duplication
* Fix maven deps
* Add test logback configuration file
* Fix unit test output
* Fix logback configuration file
* All logging are made on top of slf4j
* Fix test log configuration file name
* Fix test log configuration file name for test module
* All logging are shaded slf4j targeted
* DLedger has an explicit dependency on slf4j
* Fix DLedger
* Fix DLeader issue
* Move logback configuration files to each module
Co-authored-by: Li Zhanhui <lizhanhui@gmail.com>
* invert dependency between remoting and common module
* fix bazel
* Fix Bazel warning of indirect dependency
* remove duplicate class ServiceThread
* fix conflict
* revert delete class ServiceThread because of introduced by dledger
Co-authored-by: Li Zhanhui <lizhanhui@gmail.com>