When Quarkus meets Virtual Threads #36011
Replies: 10 comments 24 replies
-
Thanks for this good introduction post. Simple (maybe stupid) question, what is the future of Smallrye Mutiny with Virtual Threads in Quarkus ? Is it still relevant with them ? Are Vert.X reactive drivers (for DB/Redis/...) still relevant too ? |
Beta Was this translation helpful? Give feedback.
-
Thanks Clement. On the Monopolization where the suggestion is to utilize a separate platform for these long running computations, might it be possible in the future to have a hint or some type of flag on the @RunOnVirtualThread annotation that either indicated an expectation of a long running op, or even a average execution time/range such that Quarkus could add an interceptor to potentially switch the computation to another thread pool automatically? I suppose we are missing some JVM APIs to effectively manage such a switch? |
Beta Was this translation helpful? Give feedback.
-
OpenJDK documentation claims the following: "Virtual threads do not require or expect application code to explicitly hand control back to the scheduler; in other words, virtual threads are not cooperative." |
Beta Was this translation helpful? Give feedback.
-
@cescoffier Thanks for a great post! It would be also great if |
Beta Was this translation helpful? Give feedback.
-
Hi @cescoffier, Would you have a sample of Quarkus App using new Jdk 21 in docker? I'm trying to dockerize one app but couldn't find a valid image to use jdk 21 then getting the error below.
|
Beta Was this translation helpful? Give feedback.
-
I noticed that Virtual-Threads support is now available for "quarkus-resteasy-reactive" and "quarkus-smallrye-reactive-messaging". Would Virtual Threads support be coming to "quarkus-reactive-routes" soon? |
Beta Was this translation helpful? Give feedback.
-
@cescoffier loom-unit is really nice, thanks for your efforts! Would it be somehow possible to ignore some particular pinning events based on stack trace or at least count of pinning events? |
Beta Was this translation helpful? Give feedback.
-
Hi, is there some way to use virtual thread in Service level classes? i tried use @RunOnVirtualThread on my service code, but it said that it could only be applied for endpoints. When i use Thread.startVirtualThread(....) i dont have the correct context inside the thread, that is, i can not access @Intejct UserInfo userInfo inside the thread. (already tried with Arc.container().requestContext()). Thanks |
Beta Was this translation helpful? Give feedback.
-
@cescoffier could you comment this configuration parameter smallrye.messaging.worker. What is Is 1024 maximum concurrency for each method annotated with @RunOnVirtualThread or for all methods ? How limit executor service concurrency annotated with @VirtualThreads? Thanks! |
Beta Was this translation helpful? Give feedback.
-
But I still have questions I have to create a lot of soap services. The only extension is quarkus cxf. But this extension does not support either the reactive approach or virtual threads. Why? Why does this extension contradict the general principle of qaurkus to be reactive? |
Beta Was this translation helpful? Give feedback.
-
When Quarkus meets Virtual Threads
Quarkus: Supersonic Subatomic Java
https://quarkus.io/blog/virtual-thread-1/
Beta Was this translation helpful? Give feedback.
All reactions