amqphub / amqp-10-jms-spring-boot

AMQP 1.0 JMS Binding for Spring Boot
Apache License 2.0
34 stars 25 forks source link

AMQP 1.0 JMS Spring Boot

This project provides an easy way to get your Spring based JMS messaging application using AMQP v1.0 up and running quickly.

The project provides a Spring Boot based auto-configuration module which allows your application to quickly grab a JMSTemplate that is properly configured to use the Qpid JMS AMQP 1.0 client as the underlying transport. The project also provides a Spring Boot Starter that allows you to create a Spring based application that be run from the command line using just a java -jar invocation.

To use the AMQP 1.0 JMS starter in your projects you can include the maven dependency in your project pom file:

<dependency>
  <groupId>org.amqphub.spring</groupId>
  <artifactId>amqp-10-jms-spring-boot-starter</artifactId>
  <version>${current-version}</version>
</dependency>

Building the code

The project requires Maven 3. Some example commands follow.

Clean previous builds output and install all modules to local repository without running the tests:

mvn clean install -DskipTests

Install all modules to the local repository after running all the tests:

mvn clean install

Perform a subset tests on the packaged release artifacts without installing:

mvn clean verify -Dtest=TestNamePattern*

Examples

First build and install all the modules as detailed above (if running against a source checkout/release, rather than against released binaries) and then consult the README in the amqp-10-jms-spring-boot-examples module itself.

Spring configuration

The following options can be used in an 'application-properties' file to configure you Spring Boot project.

JMS Connection Configuration

The basic format of the clients Connection URI is as follows:

  amqp[s]://hostname:port[?option=value[&option2=value...]]

or for WebSocket connections:

 amqpws[s]://hostname:port[/path][?option=value[&option2=value...]]

Where the amqps and amqpwss scheme is specified to use SSL/TLS, the hostname segment from the URI can be used by the JVM for the TLS SNI (Server Name Indication) extension in order to communicate the desired server hostname during a TLS handshake. The SNI extension will be automatically included if a Fully Qualified name (e.g myhost.mydomain) is specified, but not when an unqualified name (e.g myhost) or bare IP address are used.

The client can be configured with a number of different settings using the URI while defining the ConnectionFactory and some commonly used options can be configured directly in the application properties. For a complete overview of the various configuration options available on the connection URI refer to the Qpid JMS client documentation

Connection Pooling Options

Continuous Integration

Build Status