qianye1001 opened a new pull request, #11081: URL: https://github.com/apache/rocketmq/pull/11081
### Which Issue(s) This PR Fixes Fixes #11080 ### Brief Description `NettyRemotingClient.start()` starts a `NettyEventExecutor` even when no `ChannelEventListener` is configured. Since connection handlers already skip event submission in that case, each such client keeps an unused thread polling an empty queue every three seconds. This includes internal clients built through `MQClientAPIExt`. Start the executor only when `channelEventListener != null`. Clients with a listener retain their existing event dispatch behavior. The existing shutdown implementation safely handles an executor that was never started. ### How Did You Test This Change? Added regression tests covering startup and shutdown without an event thread when no listener is configured, and ACTIVE event delivery plus thread termination when a listener is configured. Passed on JDK 11: ```sh mvn -B -pl remoting -am -Dtest=NettyRemotingClientTest -Dsurefire.failIfNoSpecifiedTests=false test ``` All 16 tests passed, including the two new tests. Checkstyle and SpotBugs also passed. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
