Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jdk21 adaptation #8295

Open
921205zhangcheng opened this issue Jun 13, 2024 · 0 comments
Open

jdk21 adaptation #8295

921205zhangcheng opened this issue Jun 13, 2024 · 0 comments

Comments

@921205zhangcheng
Copy link

Is Your Feature Request Related to a Problem?

Resource efficiency:
Virtual threads have a lower resource overhead than traditional operating system threads (i.e., "platform threads") because they do not need to allocate separate kernel resources. This allows RocketMQ to support more concurrent consumers and producers on the same hardware resources, increasing system throughput and processing power.
Simplify concurrent programming:
Virtual threads simplify the concurrent programming model, making it easier for developers to write highly concurrent code without having to dive into the details of complex issues such as thread pool size, thread creation and destruction. As a result, RocketMQ's client and server code can become more concise, easier to understand, and easier to maintain.
Dynamic scalability:
The dynamic nature of virtual threads allows RocketMQ to automatically adjust thread resources based on actual workloads, better responding to instantaneous peaks or troughs for smoother quality of service.
Reduce response latency:
In the right scenario, virtual threads can help RocketMQ reduce latency in message processing and improve immediate responsiveness through more efficient thread scheduling and resource utilization.
Challenges and Adaptations:
Despite the benefits of virtual threads, there can be challenges to integrating this feature, including modifications to existing code bases, ensuring compatibility, and dependencies on JVM versions. RocketMQ may need to adapt the underlying network IO, locking mechanisms, and thread synchronization logic to take full advantage of virtual threads.
Debugging and monitoring:
The introduction of virtual threads may require updating existing monitoring and debugging tools to properly present and manage the state and behavior of these lightweight threads, ensuring that operations teams can effectively monitor the health of RocketMQ.

Describe the Solution You'd Like

Upgrade jdk to 21
Replace traditional platform threads with virtual threads

Describe Alternatives You've Considered

Current springboot3.1.6, dubbo3.3.beta2 support virtual threads
And I've verified it in production but I found that rocketmq still uses platform threads when consuming messages
So I want to ask when to adapt virtual threads theoretically production messages and consumption messages can actually use virtual threads

Additional Context

。。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant