Java / Quarkus Interview questions
Explain the execution flow of a REST request in Quarkus using RESTEasy Reactive?
A request handled by RESTEasy Reactive takes a different path depending on whether the matched resource method is blocking or reactive, and understanding that fork is key to understanding Quarkus's concurrency model.
The event loop itself never blocks: for a plain, non-reactive method, RESTEasy Reactive automatically dispatches execution onto a worker thread pool before invoking it, so blocking calls like a synchronous JDBC query don't stall the event loop that's also responsible for handling every other concurrent connection.
For a method returning Uni or Multi, no dispatch to a worker thread happens at all — the method runs directly on the event loop, and as long as it never performs a blocking call itself, a single event-loop thread can interleave handling many concurrent in-flight requests, which is the throughput advantage reactive endpoints offer over blocking ones under high concurrency.
More Related questions...