Dev Services Overview

Quarkus supports the automatic provisioning of unconfigured services in development and test mode. We refer to this capability as Dev Services. From a developers perspective this means that if you include an extension and don’t configure it then Quarkus will automatically start the relevant service (usually using Testcontainers behind the scenes) and wire up your application to use this service.

All this functionality is part of the Quarkus deployment modules, so does not affect the production application in any way. If you want to disable all Dev Services you can use the quarkus.devservices.enabled=false config property, although in most cases this is not necessary as simply configuring the service will result in the Dev Service being disabled automatically.

This page lists all the Dev Services that Quarkus supports.

In order to use Dev Services you will generally need a working Docker environment (remote environments are supported). If you don’t have Docker installed you will need to configure your services normally.

AMQP

The AMQP Dev Service will be enabled when the quarkus-smallrye-reactive-messaging-amqp extension is present in your application, and the broker address has not been explicitly configured. More information can be found at the AMQP Dev Services Guide.

Configuration property fixed at build time - All other configuration properties are overridable at runtime

Configuration property

Type

Default

If Dev Services for AMQP has been explicitly enabled or disabled. Dev Services are generally enabled by default, unless there is an existing configuration present. For AMQP, Dev Services starts a broker unless amqp-host or amqp-port are set or if all the Reactive Messaging AMQP channel are configured with host or port.

boolean

Optional fixed port the dev service will listen to. If not defined, the port will be chosen randomly.

int

The image to use. Note that only quay.io/artemiscloud/activemq-artemis-broker images are supported. Check https://quay.io/repository/artemiscloud/activemq-artemis-broker to find the available versions.

string

quay.io/artemiscloud/activemq-artemis-broker:0.1.2

The value of the AMQ_EXTRA_ARGS environment variable to pass to the container.

string

--no-autotune --mapped --no-fsync

Indicates if the AMQP broker managed by Quarkus Dev Services is shared. When shared, Quarkus looks for running containers using label-based service discovery. If a matching container is found, it is used, and so a second one is not started. Otherwise, Dev Services for AMQP starts a new container. The discovery uses the quarkus-dev-service-amqp label. The value is configured using the service-name property. Container sharing is only used in dev mode.

boolean

true

The value of the quarkus-dev-service-aqmp label attached to the started container. This property is used when shared is set to true. In this case, before starting a container, Dev Services for AMQP looks for a container with the quarkus-dev-service-amqp label set to the configured value. If found, it will use this container instead of starting a new one. Otherwise it starts a new container with the quarkus-dev-service-amqp label set to the specified value. This property is used when you need multiple shared AMQP brokers.

string

amqp

Apicurio Registry

The Apicurio Dev Service will be enabled when the quarkus-apicurio-registry-avro extension is present in your application, and it’s address has not been explicitly configured. More information can be found at the Apicurio Registry Dev Services Guide.

Configuration property fixed at build time - All other configuration properties are overridable at runtime

Configuration property

Type

Default

If Dev Services for Apicurio Registry has been explicitly enabled or disabled. Dev Services are generally enabled by default, unless there is an existing configuration present. For Apicurio Registry, Dev Services starts a registry unless mp.messaging.connector.smallrye-kafka.apicurio.registry.url is set.

boolean

Optional fixed port the dev service will listen to. If not defined, the port will be chosen randomly.

int

The Apicurio Registry image to use. Note that only Apicurio Registry 2.x images are supported.

string

apicurio/apicurio-registry-mem:2.0.1.Final

Indicates if the Apicurio Registry instance managed by Quarkus Dev Services is shared. When shared, Quarkus looks for running containers using label-based service discovery. If a matching container is found, it is used, and so a second one is not started. Otherwise, Dev Services for Apicurio Registry starts a new container. The discovery uses the quarkus-dev-service-apicurio-registry label. The value is configured using the service-name property. Container sharing is only used in dev mode.

boolean

true

The value of the quarkus-dev-service-apicurio-registry label attached to the started container. This property is used when shared is set to true. In this case, before starting a container, Dev Services for Apicurio Registry looks for a container with the quarkus-dev-service-apicurio-registry label set to the configured value. If found, it will use this container instead of starting a new one. Otherwise it starts a new container with the quarkus-dev-service-apicurio-registry label set to the specified value. This property is used when you need multiple shared Apicurio Registry instances.

string

apicurio-registry

Databases

The database Dev Services will be enabled when a reactive or JDBC datasource extension is present in the application, and the database URL has not been configured. More information can be found at the Datasource Guide.

Quarkus provides Dev Services for all databases it supports except Oracle. Most of these are run in a container, with the exception of H2 and Derby which are run in process. Dev Services are supported for both JDBC and reactive drivers.

Configuration property fixed at build time - All other configuration properties are overridable at runtime

Configuration property

Type

Default

If DevServices has been explicitly enabled or disabled. DevServices is generally enabled by default, unless there is an existing configuration present. When DevServices is enabled Quarkus will attempt to automatically configure and start a database when running in Dev or Test mode.

boolean

The container image name to use, for container based DevServices providers. If the provider is not container based (e.g. a H2 Database) then this has no effect.

string

Optional fixed port the dev service will listen to. If not defined, the port will be chosen randomly.

int

Generic properties that are added to the database connection URL.

Map<String,String>

If DevServices has been explicitly enabled or disabled. DevServices is generally enabled by default, unless there is an existing configuration present. When DevServices is enabled Quarkus will attempt to automatically configure and start a database when running in Dev or Test mode.

boolean

The container image name to use, for container based DevServices providers. If the provider is not container based (e.g. a H2 Database) then this has no effect.

string

Generic properties that are added to the database connection URL.

Map<String,String>

Optional fixed port the dev service will listen to. If not defined, the port will be chosen randomly.

int

Kafka

The Kafka Dev Service will be enabled when the quarkus-kafka-client extension is present in your application, and the broker address has not been explicitly configured. More information can be found at the Kafka Dev Services Guide.

Configuration property fixed at build time - All other configuration properties are overridable at runtime

Configuration property

Type

Default

If Dev Services for Kafka has been explicitly enabled or disabled. Dev Services are generally enabled by default, unless there is an existing configuration present. For Kafka, Dev Services starts a broker unless kafka.bootstrap.servers is set or if all the Reactive Messaging Kafka channel are configured with a bootstrap.servers.

boolean

Optional fixed port the dev service will listen to. If not defined, the port will be chosen randomly.

int

string

vectorized/redpanda:v21.5.5

Indicates if the Kafka broker managed by Quarkus Dev Services is shared. When shared, Quarkus looks for running containers using label-based service discovery. If a matching container is found, it is used, and so a second one is not started. Otherwise, Dev Services for Kafka starts a new container. The discovery uses the quarkus-dev-service-kafka label. The value is configured using the service-name property. Container sharing is only used in dev mode.

boolean

true

The value of the quarkus-dev-service-kafka label attached to the started container. This property is used when shared is set to true. In this case, before starting a container, Dev Services for Kafka looks for a container with the quarkus-dev-service-kafka label set to the configured value. If found, it will use this container instead of starting a new one. Otherwise it starts a new container with the quarkus-dev-service-kafka label set to the specified value. This property is used when you need multiple shared Kafka brokers.

string

kafka

Timeout for admin client calls used in topic creation. Defaults to 2 seconds.

Duration

2S

The topic-partition pairs to create in the Dev Services Kafka broker. After the broker is started, given topics with partitions are created, skipping already existing topics. For example, quarkus.kafka.devservices.topic-partitions.test=2 will create a topic named test with 2 partitions. The topic creation will not try to re-partition existing topics with different number of partitions.

Map<String,Integer>

About the Duration format

The format for durations uses the standard java.time.Duration format. You can learn more about it in the Duration#parse() javadoc.

You can also provide duration values starting with a number. In this case, if the value consists only of a number, the converter treats the value as seconds. Otherwise, PT is implicitly prepended to the value to obtain a standard java.time.Duration format.

Keycloak

The Keycloak Dev Service will be enabled when the quarkus-oidc extension is present in your application, and the server address has not been explicitly configured. More information can be found at the OIDC Dev Services Guide.

Configuration property fixed at build time - All other configuration properties are overridable at runtime

Configuration property

Type

Default

If DevServices has been explicitly enabled or disabled. When DevServices is enabled Quarkus will attempt to automatically configure and start Keycloak when running in Dev or Test mode and when Docker is running.

boolean

true

The container image name to use, for container based DevServices providers.

string

quay.io/keycloak/keycloak:14.0.0

The class or file system path to a Keycloak realm file which will be used to initialize Keycloak.

string

The Keycloak realm. This property will be used to create the realm if the realm file pointed to by the 'realm-path' property does not exist. Setting this property is recommended even if realm file exists for quarkus.oidc.auth-server-url property be correctly calculated.

string

quarkus

Grant type which will be used to acquire a token to test the OIDC 'service' applications

client, password, code, implicit

code

Optional fixed port the dev service will listen to. If not defined, the port will be chosen randomly.

int

The WebClient timeout. Use this property to configure how long an HTTP client will wait for a response when requesting tokens from Keycloak and sending them to the service endpoint.

Duration

4S

The Keycloak users map containing the user name and password pairs. If this map is empty then two users, 'alice' and 'bob' with the passwords matching their names will be created. This property will be used to create the Keycloak users if the realm file pointed to by the 'realm-path' property does not exist.

Map<String,String>

The Keycloak user roles. If this map is empty then a user named 'alice' will get 'admin' and 'user' roles and all other users will get a 'user' role. This property will be used to create the Keycloak roles if the realm file pointed to by the 'realm-path' property does not exist.

Map<String,String>

MongoDB

The MongoDB Dev Service will be enabled when the quarkus-mongodb-client extension is present in your application, and the server address has not been explicitly configured. More information can be found at the MongoDB Guide.

Configuration property fixed at build time - All other configuration properties are overridable at runtime

Configuration property

Type

Default

If DevServices has been explicitly enabled or disabled. DevServices is generally enabled by default, unless there is an existing configuration present. When DevServices is enabled Quarkus will attempt to automatically configure and start a database when running in Dev or Test mode.

boolean

The container image name to use, for container based DevServices providers.

string

Optional fixed port the dev service will listen to. If not defined, the port will be chosen randomly.

int

Generic properties that are added to the connection URL.

Map<String,String>

Redis

The Redis Dev Service will be enabled when the quarkus-redis-client extension is present in your application, and the server address has not been explicitly configured. More information can be found at the Redis Dev Services Guide.

Configuration property fixed at build time - All other configuration properties are overridable at runtime

Configuration property

Type

Default

If DevServices has been explicitly enabled or disabled. DevServices is generally enabled by default, unless there is an existing configuration present. When DevServices is enabled Quarkus will attempt to automatically configure and start a database when running in Dev or Test mode and when Docker is running.

boolean

true

The container image name to use, for container based DevServices providers.

string

Optional fixed port the dev service will listen to. If not defined, the port will be chosen randomly.

int

Indicates if the Redis server managed by Quarkus Dev Services is shared. When shared, Quarkus looks for running containers using label-based service discovery. If a matching container is found, it is used, and so a second one is not started. Otherwise, Dev Services for Redis starts a new container. The discovery uses the quarkus-dev-service-redis label. The value is configured using the service-name property. Container sharing is only used in dev mode.

boolean

true

The value of the quarkus-dev-service-redis label attached to the started container. This property is used when shared is set to true. In this case, before starting a container, Dev Services for Redis looks for a container with the quarkus-dev-service-redis label set to the configured value. If found, it will use this container instead of starting a new one. Otherwise it starts a new container with the quarkus-dev-service-redis label set to the specified value. This property is used when you need multiple shared Redis servers.

string

redis

If DevServices has been explicitly enabled or disabled. DevServices is generally enabled by default, unless there is an existing configuration present. When DevServices is enabled Quarkus will attempt to automatically configure and start a database when running in Dev or Test mode and when Docker is running.

boolean

true

The container image name to use, for container based DevServices providers.

string

Optional fixed port the dev service will listen to. If not defined, the port will be chosen randomly.

int

Indicates if the Redis server managed by Quarkus Dev Services is shared. When shared, Quarkus looks for running containers using label-based service discovery. If a matching container is found, it is used, and so a second one is not started. Otherwise, Dev Services for Redis starts a new container. The discovery uses the quarkus-dev-service-redis label. The value is configured using the service-name property. Container sharing is only used in dev mode.

boolean

true

The value of the quarkus-dev-service-redis label attached to the started container. This property is used when shared is set to true. In this case, before starting a container, Dev Services for Redis looks for a container with the quarkus-dev-service-redis label set to the configured value. If found, it will use this container instead of starting a new one. Otherwise it starts a new container with the quarkus-dev-service-redis label set to the specified value. This property is used when you need multiple shared Redis servers.

string

redis

Vault

The Vault Dev Service will be enabled when the quarkus-vault extension is present in your application, and the server address has not been explicitly configured. More information can be found at the Vault Guide.

Configuration property fixed at build time - All other configuration properties are overridable at runtime

Configuration property

Type

Default

If DevServices has been explicitly enabled or disabled. DevServices is generally enabled by default, unless there is an existing configuration present. When DevServices is enabled Quarkus will attempt to automatically configure and start a vault instance when running in Dev or Test mode and when Docker is running.

boolean

true

The container image name to use, for container based DevServices providers.

string

Optional fixed port the dev service will listen to. If not defined, the port will be chosen randomly.

int

Should the Transit secret engine be enabled

boolean

false

Should the PKI secret engine be enabled

boolean

false