qianye1001 opened a new issue, #1318: URL: https://github.com/apache/rocketmq-clients/issues/1318
### Motivation Applications running many Java client instances can retain a large number of platform threads for message consumption, asynchronous RPC work, callbacks, and telemetry commands. On JDK 21, these blocking-oriented workloads can use virtual threads to reduce the platform-thread footprint. ### Proposed behavior Add a client-level configuration option that: - is disabled by default; - uses virtual-thread-per-task executors when enabled on JDK 21 or later; - transparently falls back to the existing platform-thread executors on older JDKs; - preserves `setConsumptionThreadCount` as the maximum number of concurrently running consumption tasks by using a semaphore; - keeps scheduled executors on platform threads; - does not change the Maven compiler target or Java 8 binary compatibility. ### Compatibility The public API and compiled classes should remain compatible with Java 8. JDK 21 APIs can be discovered reflectively at runtime, while JDK 8/11 continue using the existing executors. ### Validation The implementation should be covered by JDK 11 and JDK 21 tests, plus a JDK 21 end-to-end producer/consumer test that verifies both virtual-thread execution and the configured consumption concurrency limit. -- 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]
