You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "qianye1001 (via GitHub)" <gi...@apache.org> on 2026/08/06 09:08:09 UTC
[I] Support opt-in virtual threads in the Java client [rocketmq-clients]
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: commits-unsubscribe@rocketmq.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Support opt-in virtual threads in the Java client [rocketmq-clients]
Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins closed issue #1318: Support opt-in virtual threads in the Java client
URL: https://github.com/apache/rocketmq-clients/issues/1318
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Support opt-in virtual threads in the Java client [rocketmq-clients]
Posted by "RockteMQ-AI (via GitHub)" <gi...@apache.org>.
RockteMQ-AI commented on issue #1318:
URL: https://github.com/apache/rocketmq-clients/issues/1318#issuecomment-5203235020
Thanks for the detailed proposal. This looks like a well-defined enhancement: a client-level flag that enables virtual-thread-per-task executors on JDK 21+ via reflective discovery, falls back to platform threads on older JDKs, keeps scheduling executors unchanged, and preserves `setConsumptionThreadCount` with a semaphore. The compatibility and validation expectations are also clear. Before implementation, it would be helpful to confirm the exact configuration naming and whether any metrics/logging currently expose executor thread counts that might need updates.
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org