Quarkus - Guides

Table of Contents

Core

Web

Data

Messaging

Security

Business Automation

Cloud

Observability

Serialization

Tooling

Migration

Writing Extensions

Alternative Languages

Miscellaneous

You have gone through the Getting Started guides. You are now ready to dive into specific topic guides.

Configuring Your Application

Hardcoded values in your code is a no go (even if we all did it at some point ;-)). In this guide, we learn how to configure your application.

READ THE GUIDE

Application Initialization and Termination

You often need to execute custom actions when the application starts and clean up everything when the application stops. This guide explains how to be notified when an application stops or starts.

READ THE GUIDE

Contexts and Dependency Injection

Quarkus DI solution is based on the Contexts and Dependency Injection for Java 2.0 specification. However, it is not a full CDI implementation verified by the TCK. Only a subset of the CDI features is implemented - see also the list of supported features and the list of limitations.

READ THE GUIDE

Testing Your Application

This guide covers:

  • Testing in JVM mode
  • Testing in native mode
  • Injection of resources into tests

READ THE GUIDE

Configuring Logging

This guide explains logging and how to configure it.

READ THE GUIDE

Using SSL With Native Images

In this guide, we will discuss how you can get your native images to support SSL, as native images don’t support it out of the box.

READ THE GUIDE

Context Propagation

Learn more about how you can pass contextual information with our implementation of MicroProfile Context Propagation.

READ THE GUIDE


Web

Writing REST JSON Services

JSON is now the lingua franca between microservices. In this guide, we see how you can get your REST services to consume and produce JSON payloads.

READ THE GUIDE

Validation with Hibernate Validator

This guide covers how to use Hibernate Validator/Bean Validation in your REST services.

READ THE GUIDE

Using the REST Client

This guide explains how to use the MicroProfile REST Client in order to interact with REST APIs with very little effort.

READ THE GUIDE

Using JWT RBAC

This guide explains how your application can utilize MicroProfile JWT RBAC to provide secured access to the JAX-RS endpoints.

READ THE GUIDE

Using WebSockets

This guide explains how your Quarkus application can utilize web sockets to create interactive web applications. Because it’s the canonical web socket application, we are going to create a simple chat application.

READ THE GUIDE

Using OpenAPI and Swagger UI

This guide explains how to use the OpenAPI extension to generate an OpenAPI descriptor and get a Swagger UI frontend to test your REST endpoints.

READ THE GUIDE

Undertow Reference Documentation

Undertow is the webserver used by Quarkus. Learn more about configuring it.

READ THE GUIDE

Using Fault Tolerance

This guide demonstrates how your Quarkus application can utilize the MicroProfile Fault Tolerance specification through the SmallRye Fault Tolerance extension.

READ THE GUIDE


Data

Configuring your datasources

With Quarkus, you can easily configure a datasource, or several if need be.

READ THE GUIDE

Using Hibernate ORM and JPA

Hibernate ORM is the de facto JPA implementation and offers you the full breath of an Object Relational Mapper. It works beautifully in Quarkus.

READ THE GUIDE

Simplified Hibernate ORM with Panache

Hibernate ORM is the de facto JPA implementation and offers you the full breadth of an Object Relational Mapper.

It makes complex mappings possible, but it does not make simple and common mappings trivial.

Panache focuses on making your entities trivial and fun to write.

READ THE GUIDE

Hibernate Search + Elasticsearch

Hibernate Search allows you to index your entities in an Elasticsearch cluster and easily offer full text search in all your Hibernate ORM-based applications.

READ THE GUIDE

Using Infinispan Client

Infinispan is an in memory data grid that allows running in a server outside of application processes. This extension provides functionality to allow the client that can connect to said server when running in Quarkus.

READ THE GUIDE

Using Transactions

Quarkus comes with a Transaction Manager and uses it to coordinate and expose transactions to your applications. Each extension dealing with persistence will integrate with it for you. And you will explicitly interact with transactions via CDI. This guide will walk you through all that.

READ THE GUIDE

Validation with Hibernate Validator

This guide covers how to use Hibernate Validator/Bean Validation in your REST services.

READ THE GUIDE

Schema Migration with Flyway

This guide covers how to use the Flyway extension to manage your schema migrations.

READ THE GUIDE

Reactive Postgres Client

This guide covers how to use the Reactive Postgres Client in Quarkus.

READ THE GUIDE

MongoDB Client

This guide covers how to use MongoDB in Quarkus.

READ THE GUIDE

Neo4j Client

This guide covers how to use the Neo4j graph database in Quarkus.

READ THE GUIDE


Messaging

Using Apache Kafka

This guide demonstrates how your Quarkus application can utilize MicroProfile Reactive Messaging to interact with Apache Kafka.

READ THE GUIDE

Using AMQP with Reactive Messaging

This guide demonstrates how your Quarkus application can utilize MicroProfile Reactive Messaging to interact with AMQP.

READ THE GUIDE

Using Apache Kafka Streams

This guide demonstrates how your Quarkus application can utilize the Apache Kafka Streams API to implement stream processing applications based on Apache Kafka.

READ THE GUIDE

Asynchronous Message Passing

This guide explains how different beans can interact using asynchronous messages.

READ THE GUIDE


Security

Using Security

This quide demonstrates integration with the Elytron security subsystem to allow for RBAC based on the common security annotations @RolesAllowed, @DenyAll, @PermitAll on REST endpoints.

READ THE GUIDE

Using JWT RBAC

This guide explains how your application can utilize MicroProfile JWT RBAC to provide secured access to the JAX-RS endpoints.

READ THE GUIDE

Using Keycloak to Protect JAX-RS Applications

This guide demonstrates how your Quarkus application can use Keycloak to protect your JAX-RS applications using bearer token authorization, where these tokens are issued by a Keycloak server.

READ THE GUIDE

Using OAuth2 RBAC

This guide explains how your Quarkus application can utilize OAuth2 tokens to provide secured access to the JAX-RS endpoints.

READ THE GUIDE


Business Automation

Using Kogito to add business automation capabilities to an application

This guide demonstrates how your Quarkus application can use Kogito to add business automation to power it up with business processes and rules.

READ THE GUIDE


Cloud

Deploying Native Applications on Kubernetes or OpenShift

This guide covers how to deploy a native application on Kubernetes or OpenShift.

READ THE GUIDE

Deploying Native Applications on Knative Kubernetes or OpenShift

This guide demonstrates how to deploy an application on Knative Kubernetes or OpenShift.

READ THE GUIDE

Generating Kubernetes Resources

This guide demonstrates how generate Kubernetes resources using Quarkus Kubernetes extension.

READ THE GUIDE

Using the Kubernetes Client to Interact with a Kubernetes Cluster

This guide demonstrates how to use the Fabric8 Kubernetes client to interact with your Kubernetes cluster.

READ THE GUIDE

Deploying to OpenShift using S2I

This guide explains how to deploy a Quarkus application to OpenShift using S2I.

READ THE GUIDE

Deploying to Microsoft Azure Cloud

This guide explains how to deploy a Quarkus application to Microsoft Azure Cloud.

READ THE GUIDE


Observability

Using Health Check

This guide demonstrates how your Quarkus application can utilize the MicroProfile Health specification through the SmallRye Health extension.

READ THE GUIDE

Using OpenTracing

This guide explains how your Quarkus application can utilize OpenTracing to provide distributed tracing for interactive web applications.

READ THE GUIDE

Collecting Metrics

This guide demonstrates how your Quarkus application can utilize the MicroProfile Metrics specification through the SmallRye Metrics extension.

READ THE GUIDE

Using Fault Tolerance

This guide demonstrates how your Quarkus application can utilize the MicroProfile Fault Tolerance specification through the SmallRye Fault Tolerance extension.

READ THE GUIDE


Serialization

Writing REST JSON Services

JSON is now the lingua franca between microservices. In this guide, we see how you can get your REST services to consume and produce JSON payloads.

READ THE GUIDE


Tooling

Building Applications with Maven

This guide covers:

  • Maven configuration
  • Creating a new project
  • Dealing with extensions
  • Development mode
  • Debugging
  • Import in your IDE
  • Building a native image
  • Build a container friendly executable

READ THE GUIDE

Building Applications with Gradle

This guide covers:

  • Gradle configuration
  • Creating a new project
  • Dealing with extensions
  • Development mode
  • Debugging
  • Import in your IDE
  • Building a native image
  • Build a container friendly executable

READ THE GUIDE

Measuring the coverage of your tests

This guide explains how to measure the test coverage of your Quarkus application.

READ THE GUIDE


Migration

Using the Quarkus Extension for Spring DI API

While you are encouraged to use CDI annotations for injection, Quarkus provides a compatibility layer for Spring dependency injection in the form of the spring-di extension.

READ THE GUIDE

Using the Quarkus Extension for Spring Web API

While you are encouraged to use JAX-RS annotation for defining REST endpoints, Quarkus provides a compatibility layer for Spring Web in the form of the spring-web extension.

READ THE GUIDE

Using the Quarkus Extension for Spring Data JPA API

While you are encouraged to use Hibernate ORM with Panache for your data layer, Quarkus provides a compatibility layer for Spring Data JPA in the form of the spring-data-jpa extension.

READ THE GUIDE


Writing Extensions

Writing Your Own Extension

Quarkus extensions add a new developer focused behavior to the core offering, and consist of two distinct parts, buildtime augmentation and runtime container. The augmentation part is responsible for all metadata processing, such as reading annotations, XML descriptors etc. The output of this augmentation phase is recorded bytecode which is responsible for directly instantiating the relevant runtime services.

This means that metadata is only processed once at build time, which both saves on startup time, and also on memory usage as the classes etc that are used for processing are not loaded (or even present) in the runtime JVM.

READ THE GUIDE

Writing Native Applications

This guide is a collection of tips to help you solve the problems you encounter when compiling applications to native executable.

READ THE GUIDE


Alternative Languages

Using Kotlin

This guide explains how to use Kotlin.

READ THE GUIDE


Miscellaneous

Scheduling Periodic Tasks

Modern applications often need to run specific tasks periodically. In this guide, you learn how to schedule periodic tasks.

READ THE GUIDE

Sending Emails

Learn more about how you can send email from a Quarkus application with our reactive email client.

READ THE GUIDE

Extracting Content with Apache Tika

Learn more about how you extract content from documents using the Apache Tika toolkit.

READ THE GUIDE

Using Vert.x

This guide explains how to use Vert.x in Quarkus to build reactive applications.

READ THE GUIDE

Measuring Performance

When measuring the footprint of a Quarkus application, we measure Resident Set Size (RSS) and not the JVM heap size which is only a small part of the overall problem. The JVM not only allocates native memory for heap (-Xms, -Xmx) but also structures required by the jvm to run your application.

READ THE GUIDE