Quarkus Artemis JMS

This extension enables the use of the Apache ActiveMQ Artemis JMS client in Quarkus.

It provides configuration properties to configure the JMS client and native executable support.

For general considerations about the JMS support in Quarkus, it is recommended to read the JMS guide.

Installation

To benefit from a consistent definition of the Artemis dependencies (including artemis-server often used in the tests), it is recommended to add the following BOM to your project, below the Quarkus BOM:

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>io.quarkus.platform</groupId>
            <artifactId>quarkus-bom</artifactId>
            <version>${quarkus.version}</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
        <dependency>
            <groupId>io.quarkiverse.artemis</groupId>
            <artifactId>quarkus-artemis-bom</artifactId>
            <version>1.2.0</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

Once the BOM is added, simply add the io.quarkiverse.artemis:quarkus-artemis-jms extension:

<dependency>
    <groupId>io.quarkiverse.artemis</groupId>
    <artifactId>quarkus-artemis-jms</artifactId>
</dependency>

Artemis DevServices

Artemis DevServices are automatically enabled unless quarkus.artemis.url is set or quarkus.artemis.devservices.enabled is false explicitly. And if you still want to use ArtemisTestResource in the test, you need to disable artemis devservices.

Configuration Reference

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

Configuration property

Type

Default

Whether or not an health check is published in case the smallrye-health extension is present

boolean

true

Support to expose javax.jms.XAConnectionFactory

boolean

false

Enable or disable Dev Services explicitly. Dev Services are automatically enabled unless quarkus.artemis.url is set.

boolean

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

int

The ActiveMQ Artemis container image to use.

string

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

Indicates if the ActiveMQ Artemis 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 ActiveMQ Artemis starts a new container. The discovery uses the quarkus-dev-service-artemis 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-artemis 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 ActiveMQ Artemis looks for a container with the quarkus-dev-service-artemis 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-artemis label set to the specified value. This property is used when you need multiple shared ActiveMQ Artemis brokers.

string

artemis

User to start artemis broker

string

admin

Password to start artemis broker

string

admin

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

string

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

Artemis connection url

string

required

Username for authentication, only used with JMS

string

Password for authentication, only used with JMS

string