Giter Site home page Giter Site logo

quarkus-qpid-jms-quickstart's Introduction

Quarkus Qpid JMS Quickstart

This project illustrates how you can use the AMQP JMS client from Apache Qpid to interact with AMQP 1.0 servers in a Quarkus application using the Quarkus Qpid JMS extension.

A step by step outline is available in the Quarkus website JMS guide, or quick overview details can be found below.

AMQP server

To use the quickstart, you first need a running AMQP 1.0 server. For example, you can follow the instructions from the Apache ActiveMQ Artemis web site, or run the broker using the ArtemisCloud container image:

docker run -it --rm -p 8161:8161 -p 61616:61616 -p 5672:5672 -e AMQ_USER=quarkus -e AMQ_PASSWORD=quarkus quay.io/artemiscloud/activemq-artemis-broker:latest

Start the application

The application can be packaged using:

./mvnw package -DskipTests

The application is now runnable using:

java -jar target/quarkus-app/quarkus-run.jar

Then, open your browser to http://localhost:8080/prices.html, and you should see a button to fetch the latest price.

Anatomy

In addition to the prices.html page, the application is composed by 3 components:

  • PriceProducer - the PriceProducer sends random prices to a JMS queue.
  • PriceConsumer - the PriceConsumer receives the JMS message and stores the last price.
  • PriceResource - the PriceResource gets the latest price from the PriceConsumer and returns it to the browser.

The client configuration is located in the application.properties configuration file.

Running as native executable

You can compile the application into a native executable in a container using:

./mvnw clean package -Pnative -Dquarkus.native.container-build=true

The native application executable can then be run with:

./target/jms-quickstart-1.0.0-SNAPSHOT-runner

quarkus-qpid-jms-quickstart's People

Contributors

gemmellr avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.