qianye1001 opened a new pull request, #11090: URL: https://github.com/apache/rocketmq/pull/11090
### Which Issue(s) This PR Fixes Fixes #11089 ### Brief Description Reduce consumption threads for Proxy internal clients by injecting a shared executor into system-message PushConsumers. Consumer groups, subscriptions and offsets remain unchanged. `ProxyConfig` initializes the shared pool with: | Configuration | Default | | --- | --- | | `systemMessageConsumerThreadPoolCoreSize` | available processors | | `systemMessageConsumerThreadPoolMaxSize` | 2 × available processors | | `systemMessageConsumerThreadPoolQueueCapacity` | 10000 | The pool uses discard-oldest rejection and allows idle core threads to time out after one minute. Discarded futures are cancelled; discarded broadcast requests follow the existing broadcast failure cleanup so they do not pin process-queue offsets. `DefaultMQPushConsumer.setConsumeExecutor(ExecutorService)` supports externally owned executors, including virtual-thread executors supplied on JDK 21+. Both pull and POP consumption, with concurrent or orderly listeners, use the injected executor. Each consumption service tracks its own tasks for shutdown without closing or resizing the shared executor. Callers retain control of the external executor's concurrency policy. Consumers without an injected executor retain dedicated pools. ### How Did You Test This Change? - JDK 11: targeted client and Proxy regression suites passed (105 tests, 5 skips), with Checkstyle and SpotBugs enabled. The skips include the JDK-21-only virtual-thread test and non-applicable parameter combinations. - JDK 21: all five executor lifecycle tests passed, including an assertion that callbacks run on virtual threads and that one consumer can stop without closing another's executor. - Tests cover all four consumption services, independent shutdown/cancellation, rejection bookkeeping, discard-oldest behavior, broadcast process-queue/offset cleanup, Proxy configuration and shared-executor constructor wiring. -- 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]
