Skip to content

Commit

Permalink
Add topics and extensions metadata to guides
Browse files Browse the repository at this point in the history
  • Loading branch information
gsmet committed Oct 11, 2023
1 parent 7a88aa6 commit 1c3b9df
Show file tree
Hide file tree
Showing 222 changed files with 983 additions and 536 deletions.
2 changes: 2 additions & 0 deletions docs/src/main/asciidoc/amqp-dev-services.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc
include::_attributes.adoc[]
:categories: messaging
:summary: Start AMQP automatically in dev and test modes.
:extensions: io.quarkus:quarkus-smallrye-reactive-messaging-amqp
:topics: messaging,amqp,devservices,tooling,testing,devmode

Dev Services for AMQP automatically starts an AMQP 1.0 broker in dev mode and when running tests.
So, you don't have to start a broker manually.
Expand Down
3 changes: 3 additions & 0 deletions docs/src/main/asciidoc/amqp-reference.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc
////
= Reactive Messaging AMQP 1.0 Connector Reference Documentation
include::_attributes.adoc[]
:categories: messaging
:extensions: io.quarkus:quarkus-smallrye-reactive-messaging-amqp
:topics: messaging,amqp

This guide is the companion from the xref:amqp.adoc[Getting Started with AMQP 1.0].
It explains in more details the configuration and usage of the AMQP connector for reactive messaging.
Expand Down
2 changes: 2 additions & 0 deletions docs/src/main/asciidoc/amqp.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc
include::_attributes.adoc[]
:categories: messaging
:summary: This guide demonstrates how your Quarkus application can utilize SmallRye Reactive Messaging to interact with AMQP.
:extensions: io.quarkus:quarkus-smallrye-reactive-messaging-amqp
:topics: messaging,amqp

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

Expand Down
1 change: 1 addition & 0 deletions docs/src/main/asciidoc/ansible.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc
include::_attributes.adoc[]
:categories: command-line
:summary: Build and deploy your Quarkus App using Ansible
:topics: ansible,devops


Let’s see how to build and deploy a Quarkus app using https://docs.ansible.com/ansible/latest/index.html[Ansible]. We’ll see how we can automate the entire process, from the code checkout to the application compilation using Maven and then its deployment and start of the service, as a https://systemd.io/[systemd service], on the target system using Ansible and its collection for Quarkus.
Expand Down
2 changes: 2 additions & 0 deletions docs/src/main/asciidoc/apicurio-registry-dev-services.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc
include::_attributes.adoc[]
:categories: messaging
:summary: Start Apicurio Registry automatically in dev and test modes.
:topics: messaging,kafka,apicurio,registry,devservices,tooling,testing,devmode
:extensions: io.quarkus:quarkus-apicurio-registry-avro,io.quarkus:quarkus-smallrye-reactive-messaging-kafka

If an extension for schema registry, such as `quarkus-apicurio-registry-avro` or `quarkus-confluent-registry-avro`, is present, Dev Services for Apicurio Registry automatically starts an Apicurio Registry instance in dev mode and when running tests.
Also, all Kafka channels in SmallRye Reactive Messaging are automatically configured to use this registry.
Expand Down
2 changes: 2 additions & 0 deletions docs/src/main/asciidoc/appcds.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc
include::_attributes.adoc[]
:categories: core, cloud
:summary: This reference guide explains how to enable AppCDS with Quarkus.
:topics: appcds,serverless
:extensions: io.quarkus:quarkus-core

This reference guide explains how to enable Application Class Data Sharing in your Quarkus applications.

Expand Down
2 changes: 2 additions & 0 deletions docs/src/main/asciidoc/aws-lambda-http.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ include::_attributes.adoc[]
:categories: cloud
:summary: This guide explains how you can deploy Vert.x Web, Servlet, or RESTEasy microservices as an AWS Lambda.
:devtools-no-gradle:
:topics: aws,lambda,serverless,function,cloud
:extensions: io.quarkus:quarkus-amazon-lambda,io.quarkus:quarkus-amazon-lambda-http

With Quarkus you can deploy your favorite Java HTTP frameworks as AWS Lambda's using either the https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api.html[AWS Gateway HTTP API]
or https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-rest-api.html[AWS Gateway REST API]. This means that you can deploy your microservices written with RESTEasy Reactive (our Jakarta REST implementation),
Expand Down
1 change: 1 addition & 0 deletions docs/src/main/asciidoc/aws-lambda-snapstart.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc
include::_attributes.adoc[]
:categories: cloud
:summary: This document explains how to optimize your AWS Lambda application for SnapStart
:topics: aws,lambda,serverless,function,snapstart,cloud

https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html[SnapStart] is a snapshotting and restore mechanism reducing drastically the cold startup time of Java functions on AWS.
This document explains the various settings you can use to leverage this feature.
Expand Down
2 changes: 2 additions & 0 deletions docs/src/main/asciidoc/aws-lambda.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc
include::_attributes.adoc[]
:categories: cloud
:summary: This guide explains how you can deploy Quarkus-based AWS Lambdas.
:topics: aws,lambda,serverless,function,cloud
:extensions: io.quarkus:quarkus-amazon-lambda

The `quarkus-amazon-lambda` extension allows you to use Quarkus to build your AWS Lambdas.
Your lambdas can use injection annotations from CDI or Spring and other Quarkus facilities as you need them.
Expand Down
2 changes: 2 additions & 0 deletions docs/src/main/asciidoc/azure-functions-http.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc
include::_attributes.adoc[]
:categories: cloud
:summary: Deploy Vert.x Web, Servlet, or RESTEasy microservices as a Microsoft Azure Function.
:topics: azure,serverless,function,cloud
:extensions: io.quarkus:quarkus-azure-functions-http

The `quarkus-azure-functions-http` extension allows you to write microservices with RESTEasy Reactive (our Jakarta REST implementation),
Undertow (servlet), Reactive Routes, or xref:funqy-http.adoc[Funqy HTTP] and make these microservices deployable to the Azure Functions runtime.
Expand Down
2 changes: 2 additions & 0 deletions docs/src/main/asciidoc/azure-functions.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc
include::_attributes.adoc[]
:categories: cloud
:summary: Integrate Quarkus with the Microsoft Azure functions that you have written.
:topics: azure,serverless,function,cloud
:extensions: io.quarkus:quarkus-azure-functions

The `quarkus-azure-functions` extension is a simple integration point between Azure Functions
and Quarkus. It interacts with Azure Functions runtime to bootstrap quarkus and turns any
Expand Down
1 change: 1 addition & 0 deletions docs/src/main/asciidoc/build-analytics.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc
= Build analytics
:categories: analytics
:summary: This guide presents what build analytics is and how to configure it.
:extensions: io.quarkus:quarkus-core

The Quarkus team has limited knowledge, from Maven download numbers, of the remarkable growth of Quarkus and the number of users reporting issues/concerns. Still, we need more insight into the platforms, operating system, Java combinations, and build tools our users employ.
The build analytics tool aims to provide us with this information.
Expand Down
1 change: 1 addition & 0 deletions docs/src/main/asciidoc/building-my-first-extension.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc
include::_attributes.adoc[]
:categories: writing-extensions
:summary: Learn step by step how to build a simple extension.
:topics: extensions

Quarkus extensions enhance your application just as projects dependencies do.
The role of the extensions is to leverage Quarkus paradigms to integrate seamlessly a library into Quarkus architecture - e.g. do more things at build time.
Expand Down
2 changes: 2 additions & 0 deletions docs/src/main/asciidoc/building-native-image.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc
include::_attributes.adoc[]
:categories: getting-started, native
:summary: Build native executables with GraalVM or Mandrel.
:topics: native,graalvm,mandrel
:extensions: io.quarkus:quarkus-core

This guide covers:

Expand Down
2 changes: 2 additions & 0 deletions docs/src/main/asciidoc/cache-redis-reference.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc
include::_attributes.adoc[]
:categories: data
:summary: Use Redis as the Quarkus cache backend
:topics: redis,cache,data
:extensions: io.quarkus:quarkus-redis-cache,io.quarkus:quarkus-redis-client

By default, Quarkus Cache uses Caffeine as backend.
It's possible to use Redis instead.
Expand Down
2 changes: 2 additions & 0 deletions docs/src/main/asciidoc/cache.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc
include::_attributes.adoc[]
:categories: data
:summary: This guide explains how to cache expensive method calls of your CDI beans using simple annotations.
:topics: cache,data
:extensions: io.quarkus:quarkus-cache

In this guide, you will learn how to enable application data caching in any CDI managed bean of your Quarkus application.

Expand Down
1 change: 1 addition & 0 deletions docs/src/main/asciidoc/camel.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc
include::_attributes.adoc[]
:categories: integration
:summary: This guide covers the systems integration with Apache Camel
:topics: camel,integration

https://camel.apache.org/[Apache Camel] is the Swiss knife of integrating heterogeneous systems with more than a decade
of history and a lively community of users and developers.
Expand Down
4 changes: 3 additions & 1 deletion docs/src/main/asciidoc/capabilities.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc
include::_attributes.adoc[]
:categories: writing-extensions
:summary: How capabilities are implemented and used in Quarkus.
:topics: extensions
:extensions: io.quarkus:quarkus-core

Quarkus extensions may provide certain capabilities and require certain capabilities to be provided by other extensions in an application to function properly.

Expand Down Expand Up @@ -146,7 +148,7 @@ quarkusExtension {
NOTE: It is possible to specify `onlyIfNot` conditions as well. . Conditions can also be set for required capabilities.
****

In this case, `io.quarkus.container.image.openshift.deployment.OpenshiftBuild` should be included in one of the extension deployment dependencies and implement `java.util.function.BooleanSupplier`. At build time, the Quarkus bootstrap will create an instance of it and register `io.quarkus.container.image.openshift` capability only if its `getAsBoolean()` method returns true.
In this case, `io.quarkus.container.image.openshift.deployment.OpenshiftBuild` should be included in one of the extension deployment dependencies and implement `java.util.function.BooleanSupplier`. At build time, the Quarkus bootstrap will create an instance of it and register `io.quarkus.container.image.openshift` capability only if its `getAsBoolean()` method returns true.

An implementation of the `OpenshiftBuild` could look like this:
[source,java]
Expand Down
1 change: 1 addition & 0 deletions docs/src/main/asciidoc/cassandra.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc
include::_attributes.adoc[]
:categories: data
:summary: This guide covers how to use the Apache Cassandra NoSQL database in Quarkus.
:topics: data,cassandra

Apache Cassandra® is a free and open-source, distributed, wide column store, NoSQL database
management system designed to handle large amounts of data across many commodity servers, providing
Expand Down
36 changes: 19 additions & 17 deletions docs/src/main/asciidoc/cdi-integration.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc
include::_attributes.adoc[]
:numbered:
:toclevels: 2
:topics: cdi,arc,injection
:extensions: io.quarkus:quarkus-arc

ArC, the CDI container in Quarkus, is bootstrapped at build time.
To integrate with the container, https://jakarta.ee/specifications/cdi/4.0/jakarta-cdi-spec-4.0.html#spi_lite[CDI Build Compatible Extensions, window="_blank"] can be used, as well as a Quarkus-specific extension API.
Expand All @@ -19,7 +21,7 @@ The container is bootstrapped in multiple phases.
From a high level perspective these phases go as follows:
1. Initialization
2. Bean discovery
2. Bean discovery
3. Registration of synthetic components
4. Validation
Expand All @@ -40,7 +42,7 @@ In the following sections we will describe all the relevant build items and comm
Classes and annotations are the primary source of bean-level metadata.
The initial metadata are read from the _bean archive index_, an immutable https://github.com/wildfly/jandex[Jandex index, window="_blank"] which is built from various sources during <<cdi-reference.adoc#bean_discovery,bean discovery>>.
However, extensions can add, remove or transform the metadata at certain stages of the bootstrap.
Moreover, extensions can also register <<synthetic_beans,synthetic components>>.
Moreover, extensions can also register <<synthetic_beans,synthetic components>>.
This is an important aspect to realize when integrating CDI components in Quarkus.

This way, extensions can turn classes, that would be otherwise ignored, into beans and vice versa.
Expand All @@ -57,14 +59,14 @@ There are several reasons why a class is not recognized and also several ways to
In the first step we should identify the _reason_.

[[additional_bean_build_item]]
=== _Reason 1_: Class Is Not discovered
=== _Reason 1_: Class Is Not discovered

Quarkus has a <<cdi-reference.adoc#bean_discovery,simplified discovery>>.
It might happen that the class is not part of the application index.
For example, classes from the _runtime module_ of a Quarkus extension are not indexed automatically.

_Solution_: Use the `AdditionalBeanBuildItem`.
This build item can be used to specify one or more additional classes to be analyzed during the discovery.
_Solution_: Use the `AdditionalBeanBuildItem`.
This build item can be used to specify one or more additional classes to be analyzed during the discovery.
Additional bean classes are transparently added to the application index processed by the container.

IMPORTANT: It is not possible to conditionally enable/disable additional beans via the `@IfBuildProfile`, `@UnlessBuildProfile`, `@IfBuildProperty` and `@UnlessBuildProperty` annotations as described in <<cdi-reference.adoc#enable_build_profile>> and <<cdi-reference.adoc#enable_build_properties>>. Extensions should inspect the configuration or the current profile and only produce an `AdditionalBeanBuildItem` if really needed.
Expand All @@ -85,7 +87,7 @@ However, you can use `AdditionalBeanBuildItem.Builder.setUnremovable()` method t
See also <<cdi-reference.adoc#remove_unused_beans,Removing Unused Beans>> and <<unremovable_builditem>> for more details.

It is aso possible to set the default scope via `AdditionalBeanBuildItem.Builder#setDefaultScope()`.
The default scope is only used if there is no scope declared on the bean class.
The default scope is only used if there is no scope declared on the bean class.

NOTE: If no default scope is specified the `@Dependent` pseudo-scope is used.

Expand Down Expand Up @@ -127,7 +129,7 @@ However, you can change the default behavior.
See also <<cdi-reference.adoc#remove_unused_beans,Removing Unused Beans>> and <<unremovable_builditem>> for more details.

It is also possible to specify the default scope.
The default scope is only used if there is no scope declared on the bean class.
The default scope is only used if there is no scope declared on the bean class.

NOTE: If no default scope is specified the `@Dependent` pseudo-scope is used.

Expand All @@ -136,7 +138,7 @@ NOTE: If no default scope is specified the `@Dependent` pseudo-scope is used.

The container attempts to <<cdi-reference.adoc#remove_unused_beans,remove all unused beans>> during the build by default.
This optimization allows for _framework-level dead code elimination_.
In few special cases, it's not possible to correctly identify an unused bean.
In few special cases, it's not possible to correctly identify an unused bean.
In particular, Quarkus is not able to detect the usage of the `CDI.current()` static method yet.
Extensions can eliminate possible false positives by producing an `UnremovableBeanBuildItem`.

Expand All @@ -155,7 +157,7 @@ UnremovableBeanBuildItem unremovableBeans() {
It is likely that the annotation class is not part of the application index.
For example, classes from the _runtime module_ of a Quarkus extension are not indexed automatically.

_Solution_: Use the `AdditionalBeanBuildItem` as described in <<additional_bean_build_item>>.
_Solution_: Use the `AdditionalBeanBuildItem` as described in <<additional_bean_build_item>>.

[[annotations_transformer_build_item]]
== Use Case - I Need To Transform Annotation Metadata
Expand Down Expand Up @@ -297,8 +299,8 @@ SyntheticBeanBuildItem syntheticBean() {
----
<1> Generate the bytecode of the `jakarta.enterprise.context.spi.Contextual#create(CreationalContext<T>)` implementation.

The output of a bean configurator is recorded as bytecode.
Therefore, there are some limitations in how a synthetic bean instance is created at runtime.
The output of a bean configurator is recorded as bytecode.
Therefore, there are some limitations in how a synthetic bean instance is created at runtime.
You can:

1. Generate the bytecode of the `Contextual#create(CreationalContext<T>)` method directly via `ExtendedBeanConfigurator.creator(Consumer<MethodCreator>)`.
Expand Down Expand Up @@ -344,7 +346,7 @@ Synthetic beans initialized during `RUNTIME_INIT` must not be accessed during `S
[source,java]
----
@BuildStep
@Record(RUNTIME_INIT)
@Record(RUNTIME_INIT)
@Consume(SyntheticBeansRuntimeInitBuildItem.class) <1>
void accessFoo(TestRecorder recorder) {
recorder.foo(); <2>
Expand Down Expand Up @@ -411,7 +413,7 @@ IMPORTANT: A build step that consumes the `ObserverRegistrationPhaseBuildItem` s
----
@BuildStep
void syntheticObserver(ObserverRegistrationPhaseBuildItem observerRegistrationPhase,
BuildProducer<MyBuildItem> myBuildItem,
BuildProducer<MyBuildItem> myBuildItem,
BuildProducer<ObserverConfiguratorBuildItem> observerConfigurationRegistry) {
observerConfigurationRegistry.produce(new ObserverConfiguratorBuildItem(observerRegistrationPhase.getContext()
.configure()
Expand All @@ -424,8 +426,8 @@ void syntheticObserver(ObserverRegistrationPhaseBuildItem observerRegistrationPh
}
----

The output of a `ObserverConfigurator` is recorded as bytecode.
Therefore, there are some limitations in how a synthetic observer is invoked at runtime.
The output of a `ObserverConfigurator` is recorded as bytecode.
Therefore, there are some limitations in how a synthetic observer is invoked at runtime.
Currently, you must generate the bytecode of the method body directly.

[[generated_beans]]
Expand Down Expand Up @@ -462,7 +464,7 @@ IMPORTANT: A build step that consumes the `ValidationPhaseBuildItem` should alwa
----
@BuildStep
void validate(ValidationPhaseBuildItem validationPhase,
BuildProducer<MyBuildItem> myBuildItem,
BuildProducer<MyBuildItem> myBuildItem,
BuildProducer<ValidationErrorBuildItem> errors) {
if (someCondition) {
errors.produce(new ValidationErrorBuildItem(new IllegalStateException()));
Expand Down Expand Up @@ -606,7 +608,7 @@ NOTE: In theory, you can use <<annotations_transformer_build_item,an `Annotation
== Use Case - Resource Annotations and Injection

The `ResourceAnnotationBuildItem` can be used to specify resource annotations that make it possible to resolve non-CDI injection points, such as Jakarta EE resources.
An integrator must also provide a corresponding `io.quarkus.arc.ResourceReferenceProvider` service provider implementation.
An integrator must also provide a corresponding `io.quarkus.arc.ResourceReferenceProvider` service provider implementation.

.`ResourceAnnotationBuildItem` Example
[source,java]
Expand Down
2 changes: 2 additions & 0 deletions docs/src/main/asciidoc/cdi-reference.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ include::_attributes.adoc[]
:numbered:
:sectnums:
:sectnumlevels: 4
:topics: cdi,arc,injection,interceptor,observer
:extensions: io.quarkus:quarkus-arc

Quarkus DI solution (also called ArC) is based on the https://jakarta.ee/specifications/cdi/4.0/jakarta-cdi-spec-4.0.html[Jakarta Contexts and Dependency Injection 4.0, window="_blank"] specification.
It implements the CDI Lite specification, with selected improvements on top, and passes the CDI Lite TCK.
Expand Down
2 changes: 2 additions & 0 deletions docs/src/main/asciidoc/cdi.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ include::_attributes.adoc[]
:numbered:
:sectnums:
:sectnumlevels: 4
:topics: cdi,arc,injection,interceptor,observer
:extensions: io.quarkus:quarkus-arc

In this guide we're going to describe the basic principles of the Quarkus programming model that is based on the https://jakarta.ee/specifications/cdi/4.0/jakarta-cdi-spec-4.0.html[Jakarta Contexts and Dependency Injection 4.0, window="_blank"] specification.
Expand Down
Loading

0 comments on commit 1c3b9df

Please sign in to comment.