12 Custom Quarkus extensions
This chapter covers
- Why you would want to create a custom Quarkus extension
- Explaining the concepts and the structure of an extension
- A practical example of building and using an extension
- Writing automated tests for an extension
In the last chapter of this book, we look at Quarkus extensions. You already know that Quarkus is a framework that is built on top of a set of extensions. An extension is usually a set of features related to a specific technology that makes it easy to integrate it in your Quarkus application.
Let’s note right away that creating Quarkus extensions is an advanced topic, and many Quarkus users will not need it. But if you still decide to try it, it will give you a much deeper understanding of how Quarkus works internally, especially the build-time and runtime split. In this chapter, we will create a relatively simple example extension, and explain the necessary theoretical concepts.
It is also important to note that when you want to use a specific library in a Quarkus application, it’s not generally necessary to have a dedicated Quarkus extension for it, but in many cases it can make usage of the library in Quarkus applications much easier. In the following section, we discuss a set of possible things that an extension might do to facilitate building Quarkus applications using a specific library.