This project demonstrates how to interact with AMQP 1.0 using Red Hat AMQ Broker and Red Hat build of Apache Camel for Quarkus. It builds on the Quarkus AMQP quickstart, with both the quote producer and processor reimplemented using Camel for Quarkus.
- JDK 21 installed with
JAVA_HOME
configured appropriately - Apache Maven 3.9+
- Docker or Podman
NOTE: When the
quarkus-messaging-amqp
extension is present and no AMQP broker is explicitly configured, Quarkus automatically enables AMQP Dev Service. This starts a temporary Apache ActiveMQ Artemis broker in development and test modes, streamlining setup and reducing manual configuration.
In a first terminal, run:
mvn -f quotes-producer quarkus:dev
In a second terminal, run:
mvn -f quotes-processor quarkus:dev -Dquarkus.http.port=8081
Then, open your browser to http://localhost:8080/quotes.html
, and click on the Request Quote
button.
- Red Hat AMQ Broker v7.12+ operator is deployed in OpenShift
- Login to the OpenShift cluster:
oc login ...
- Switch to the target OpenShift project:
oc project ...
- Deploy the Red Hat AMQ Broker v7.12+ instance:
oc apply -f openshift/amq-broker.yaml
- Deploy the
quotes-producer
:mvn -f quotes-producer package -Dquarkus.openshift.deploy=true
- Deploy the
quotes-processor
:mvn -f quotes-processor package -Dquarkus.openshift.deploy=true
- Run the following command to get the frontend URL for the Quotes app:
echo "http://`(oc get route quotes-producer -o jsonpath='{.spec.host}')`/quotes.html"