Quarkus Reference
|
This section documents Quarkus 3.39.x (current) with 3.33.x LTS as the production recommendation, on the Java 17+ baseline, as published at the official Quarkus guides — which are the reference these pages are written and verified against. Quarkus 4 raises the baseline to Java 21 (first release candidate planned for end of September 2026, see the Quarkus blog); readers upgrading past 3.39.x/3.33.x LTS should expect that change. This content was generated with the assistance of AI and should be verified against those official guides before being relied on in production. This section’s bibliography lists the reference material consulted while preparing these pages. |
Welcome to the Quarkus reference. Quarkus is a Kubernetes-native Java framework built for GraalVM and the JVM alike: it moves as much work as possible — classpath scanning, bean discovery, proxy generation, configuration metadata — from application startup into an augmentation build step, so the resulting application starts in milliseconds, uses a fraction of the memory of a traditionally-bootstrapped Java application, and compiles cleanly to a native executable. That trade — accepting a closed-world assumption about what the application will do at runtime, in exchange for build-time speed and density — is the thread that runs through every page in this section.
If you are new to Quarkus, read Getting Started with Quarkus first, then Build-Time Augmentation and the Closed World to understand why it behaves the way it does, then CDI and the Programming Model (ArC) and Configuration for the two mechanisms every other page assumes. From there, read the rest of this section as needed for the technology you are integrating.
Quarkus sits alongside, not in place of, several existing references in this repository. For the Java
framework most directly comparable to it, see the sibling SpringBoot
Reference — Quarkus vs. Spring Boot maps the two
concept-for-concept and Spring API Compatibility Extensions
covers migrating existing Spring code, while Java or Kotlin for
Quarkus? mirrors the SpringBoot section’s own language comparison. Quarkus does not re-document the
technologies it integrates: for JPA/Hibernate fundamentals see the
Hibernate Reference (Quarkus’s own pages cover only what
Hibernate ORM in Quarkus and
Panache add on top); for GraphQL schema design, pagination, security and
federation see the GraphQL Reference (Quarkus adds only the SmallRye server and
client bindings on GraphQL with SmallRye); and for the OAuth/OIDC protocols
themselves — flows, tokens, JWTs, the Security BCP — see the OAuth Reference
(Quarkus adds only the quarkus-oidc/quarkus-smallrye-jwt bindings on
JWT, OIDC and Keycloak).
What’s covered
Foundations
-
Getting Started with Quarkus — what Quarkus solves, the four ways to create a project, the first REST endpoint, dev mode, and packaging.
-
Build-Time Augmentation and the Closed World — the three-phase model, the closed-world assumption, class loading in dev vs. production, and the honest costs.
-
Extensions and the Platform — what an extension is, the platform BOM vs. the universe BOM vs. Quarkiverse, and the extension registry.
-
CDI and the Programming Model (ArC) — ArC’s build-time CDI, bean discovery and scopes, injection styles, producers/qualifiers/interceptors, and CDI events.
-
Configuration — config sources and precedence,
@ConfigMapping, profiles, and build-time-fixed vs. runtime-overridable properties. -
Developer Experience: Dev Mode, Dev UI, Dev Services — live reload semantics, the Dev UI, automatic Dev Services containers, and continuous testing.
REST, web and APIs
-
Quarkus REST — resources and parameter annotations, the
@Blocking/non-blocking dispatch decision, exception mapping, CORS/HTTP configuration, and migrating from RESTEasy Classic. -
The MicroProfile REST Client — typed client interfaces, headers and propagation, exception mapping, TLS, and composing with fault tolerance and Stork.
-
OpenAPI and Swagger UI — SmallRye OpenAPI generation,
/q/openapiand/q/swagger-ui, and code-first vs. contract-first development. -
GraphQL with SmallRye — the SmallRye GraphQL server (
@GraphQLApi,@Query,@Mutation,@Subscription) and clients, linking the GraphQL reference for everything else. -
gRPC — protobuf-first code generation, blocking/Mutiny/virtual-thread service implementations, streaming, and interceptors.
-
WebSockets Next — connection and broadcast APIs, security integration, back-pressure, and the legacy Undertow-based extension.
-
Qute Templating — syntax, type-safe templates with
@CheckedTemplate, i18n, and the adjacent Quinoa/Renarde extensions. -
Reactive Routes and the Vert.x HTTP Layer — reactive routes, direct Vert.x API access and the event bus, and the HTTP/management interface split.
Data
-
Datasources and Transactions — JDBC and reactive datasources, Agroal connection-pool tuning, Narayana JTA transactions, and XA/LRA.
-
Hibernate ORM in Quarkus — the no-
persistence.xmlconfiguration model, entity discovery, second-level caching, and build-time metamodel generation. -
Panache: The Quarkus Data API — active record vs. repository, simplified queries, pagination and sorting, and REST Data with Panache.
-
Reactive Data Access — reactive SQL clients, Hibernate Reactive (including with Panache), and the rule against mixing blocking calls into a reactive path.
-
NoSQL and Other Stores — MongoDB, Redis, Elasticsearch/ OpenSearch, Infinispan, Cassandra, and a survey of Quarkiverse-hosted stores.
-
Database Migrations — Flyway and Liquibase, and migration strategy in a rolling Kubernetes deploy.
-
The Quarkus Cache Extension — the
@CacheResultannotation family, the Caffeine/Redis/Infinispan backends, and cache-stampede/invalidation caveats. -
Validation with Hibernate Validator — constraints on REST payloads and CDI beans, custom constraints, and native-image considerations.
Reactive, concurrency and messaging
-
Reactive Programming and Mutiny — the Vert.x event-loop/worker-thread model, Mutiny’s
Uni/Multioperators, and context propagation. -
Virtual Threads in Quarkus —
@RunOnVirtualThread, pinning and thread-local cost, monitoring, and honest benchmarking guidance. -
Messaging with SmallRye Reactive Messaging — channels and connectors, Kafka in depth (serde, consumer groups, DLQs, transactions), and RabbitMQ/AMQP/Pulsar/JMS.
Security
-
Security Overview and Architecture —
SecurityIdentity, identity providers, authorization annotations and policies, and security testing. -
Authentication Mechanisms and Identity Stores — basic/form/JDBC/JPA authentication, LDAP, WebAuthn/passkeys, and mutual TLS.
-
JWT, OIDC and Keycloak — MicroProfile JWT,
quarkus-oidcweb-app and service modes, token propagation, and Dev Services for Keycloak. -
Secrets, TLS and Hardening — keeping secrets out of configuration, the TLS registry, and a production hardening checklist.
Observability and resilience
-
Observability: Health, Logging, Metrics, Tracing — SmallRye Health, logging configuration, Micrometer metrics, and OpenTelemetry tracing.
-
Fault Tolerance and Resilience — SmallRye Fault Tolerance annotations (retry, timeout, bulkhead, circuit breaker, fallback), and Stork load balancing.
Testing
-
Testing Quarkus Applications —
@QuarkusTestand mocking,@QuarkusComponentTest/@QuarkusIntegrationTest, continuous testing, and testing secured endpoints.
Packaging, native images and deployment
-
Packaging and JVM Modes — fast-jar, legacy-jar, uber-jar and mutable-jar, AOT caching, and JLink custom runtime images.
-
Native Executables with GraalVM/Mandrel — the closed-world native build, what fails and why, and an honest cost/benefit table.
-
Container Images — the Jib/Docker/Buildpacks/S2I extensions and the Dockerfiles Quarkus generates.
-
Kubernetes and OpenShift — generating Kubernetes/ OpenShift manifests, one-step deploy, and the Fabric8 client extension.
-
Serverless and Cloud Functions — AWS Lambda, Google Cloud Functions, Azure Functions, and Funqy as a portable function API.
-
Command Mode and CLI Applications —
@QuarkusMain, Picocli option/subcommand parsing, and when command mode is the right shape. -
Scheduling and Mail —
@Scheduledcron/interval syntax, Quartz for clustered schedules, and the Mailer extension.
Advanced
-
Writing Extensions — the deployment/runtime module split, build steps and recorders, and writing a Dev Service or Dev UI page.
-
Spring API Compatibility Extensions — the eleven Spring compatibility extensions, what "compatible" really means, and a realistic migration path.
-
Build Tooling and Language Support — the CLI, Maven and Gradle tooling,
quarkus update, and Kotlin build mechanics. -
Performance and Tuning — measurement methodology, HTTP and connection-pool tuning knobs, and Quarkus-specific performance pitfalls.
-
Java or Kotlin for Quarkus? — first-class Kotlin support, a pros/cons comparison, and a side-by-side REST resource.
Comparison
-
Quarkus vs. Spring Boot — a concept-and-annotation mapping table, an architecture/startup/ecosystem comparison, and a decision guide with no benchmark figures.
Reference
-
Quarkus Cheat Sheet — a one-page, printable summary of the whole section, with a downloadable PDF.
Bibliography
-
Official Quarkus documentation — the official Quarkus guides (the primary source and reference every page in this section is written and verified against), the Quarkus blog (including the Java 21 / Quarkus 4 announcement), the Quarkus extension registry and code.quarkus.io, and the Quarkus source repository.
-
Upstream specifications and projects — Jakarta EE, Eclipse MicroProfile, SmallRye (Mutiny, GraphQL, Reactive Messaging, Fault Tolerance, JWT, Health, OpenAPI and Stork), Eclipse Vert.x, GraalVM and Mandrel, Hibernate (ORM, Validator, Reactive and Search), Keycloak, Apache Kafka, OpenTelemetry, Micrometer, Camel Quarkus, and the Quarkiverse extension catalogue.
-
Spring documentation (comparison and compatibility pages only) — the Spring Boot reference documentation and the Spring Framework reference, cited only from Quarkus vs. Spring Boot and Spring API Compatibility Extensions — never as a source for how Quarkus itself works.
-
Consulted reference books (bibliography only — not the primary or main source for any page):
-
Quarkus Cookbook. O’Reilly Media, 2020. ISBN 978-1-492-06265-3 — publisher page. Targets Quarkus 1.4 on
javax.*, before the Jakarta EE 9+ namespace migration,@ConfigMapping, Quarkus REST (then RESTEasy Reactive did not yet exist), Mutiny’s current operator set, and Dev Services existed; its extension names, package roots and several of its recipes are largely superseded and must be re-verified against the official guides before use. -
Quarkus in Action. Manning Publications, published January 2025. Targets Quarkus 3.15 LTS — publisher page. Current at time of writing but one LTS release behind this section’s 3.33.x LTS / 3.39.x current baseline; treat version-sensitive details (extension coordinates, configuration property names, Dev Services defaults) as a starting point to re-verify, not a final answer.
-
Wherever either book and the official Quarkus guides disagree — or wherever a book is silent on something introduced after its own target version — the official guides are authoritative. Neither book’s benchmark or footprint figures may be quoted anywhere in this section; both books are cited and linked here only and are never attached, uploaded or excerpted.