Skip to content

Latest commit

 

History

History

amqp-quickstart

Quarkus AMQP 1.0 Quickstart

This project illustrates how you can interact with AMQP 1.0 (Apache Artemis in this quickstart) using MicroProfile Reactive Messaging. The complete instructions are available on https://quarkus.io/guides/amqp.

Start the application in dev mode

In a first terminal, run:

> mvn -f amqp-quickstart-producer quarkus:dev

In a second terminal, run:

> mvn -f amqp-quickstart-processor quarkus:dev

Then, open your browser to http://localhost:8080/quotes.html, and click on the "Request Quote" button.

Build the application in JVM mode

To build the applications, run:

> mvn -f amqp-quickstart-producer package
> mvn -f amqp-quickstart-processor package

Because we are running in prod mode, we need to provide an AMQP 1.0 broker. The docker-compose.yml file starts the broker and your application.

Start the broker and the applications using:

> docker compose up --build

Then, open your browser to http://localhost:8080/quotes.html, and click on the "Request Quote" button.

Build the application in native mode

To build the applications into native executables, run:

> mvn -f amqp-quickstart-producer package -Pnative  -Dquarkus.native.container-build=true
> mvn -f amqp-quickstart-processor package -Pnative -Dquarkus.native.container-build=true

The -Dquarkus.native.container-build=true instructs Quarkus to build Linux 64bits native executables, who can run inside containers.

Then, start the system using:

> export QUARKUS_MODE=native
> docker compose up

Then, open your browser to http://localhost:8080/quotes.html, and click on the "Request Quote" button.