Skip to content

Latest commit

 

History

History
140 lines (100 loc) · 5.15 KB

README.adoc

File metadata and controls

140 lines (100 loc) · 5.15 KB

Query/Response for Spring® AMQP

badge community

WIP: Driving the initial version from this README, please feel free to provide feedback through issues.

Build safer and more resilient distributed services. Get the benefits of an always async approach to data exchange. Ensure decoupling of components. Be better prepared for system evolution. Create more scalable solutions. Change the way you think and design, by using Query/Response for Spring AMQP.

Batteries, included

Query/Response provides tools to allow developers to monitor, measure, explore and discover the capabilities of their runtime system. Metrics and interactive utilities, built-in. See ui for more information.

ui

Quickstart

The Query/Response library can easily be added to any Spring Boot® project, as a single dependency.

  <dependency>
    <!-- From Jitpack-repo -->
    <groupId>com.github.olle</groupId>
    <artifactId>query-response-spring-amqp</artifactId>
    <version>${SOME-TAG}</version>
  </dependency>

At the current time we recommend using Jitpack to resolve the dependency. Query/Response will however be published to the Sonatype OSS repository and Maven Central in the future.

@EnableQueryResponse

To initialize the Query/Response library resources, and load the QueryResponseConfiguration class, the @EnableQueryResponse annotation can simply be added to any Spring Boot application starter.

@SpringBootApplication
@EnableQueryResponse
public class App {
  ...
}

The configuration will try to connect to an AMQP message broker, using the common configurations for Spring AMQP. The default setup will try to connect to a local broker with the username and password guest/guest.

Please see the provided examples/ for a simple setup with RabbitMQ as a docker container, to get you started.

Queries

The fluid Query/Response API makes it easy for developers to understand and decide on a strategy for service integration. Timeouts are first-class citizens in the API and protect against surprises.

  var authors = queryBuilder.queryFor("authors", String.class)
                  .waitingFor(800)
                  .orEmpty();

Responses

To create responding services we provide a really effective and expressive fluid-API. Developers benefit from the declarative style, and won’t have to write any boilerplate code. It is easy to understand, work with and explore.

Very simple scenarios can quickly be created, for tests or proof of concept work.

  responseBuilder.respondTo("authors", String.class)
      .withAll()
      .from("William Gibson", "Isaac Asimov", "J.R.R. Tolkien");

Documentation & Examples

Read more and learn how to use Query/Response, and how it works, in the online documentation.

Also make sure to check out the working examples to get started quickly with Query/Response.

Request For Comments (RFC) & Architectural Design Records (ADR)

Under the docs folder there are RFC documents, which provide a way for anyone to introduce ideas and trigger a discussion, as well as ADR documents that describe which important decisions were made, and why.

Versions & Spring Boot

This project is very much an extension and amalgamation of the AMQP features provided in Spring Boot. Therefore, there needs to be a living relationship between the generational release versions of Spring Boot and this project.

We will build and tag an initial version 0.9.x as a preliminary working version of Query/Response. This version will only support the current and latest version of Spring Boot, in our main branch.

  • main → Spring Boot 3.3.x

There will be no other minor version increment under the initial major version 0.x.x. The 0.9.x version will be used to iron out bugs and gather feedback for an upcoming stable 1.0.0 version.

No longer active

The following branches and versions are no longer actively supported or back-ported to. The intent is to never linger behind the list of active Spring Boot versions.

  • inactive/spring-boot-2.7.x → Spring Boot 2.7.x

  • inactive/spring-boot-2.6.x → Spring Boot 2.6.x

  • inactive/spring-boot-2.5.x → Spring Boot 2.5.x

  • inactive/spring-boot-2.4.x → Spring Boot 2.4.x

  • inactive/spring-boot-2.3.x → Spring Boot 2.3.x.RELEASE

  • inactive/spring-boot-2.2.x → Spring Boot 2.2.x.RELEASE

  • inactive/spring-boot-2.1.x → Spring Boot 2.1.x.RELEASE

  • inactive/spring-boot-1.5.x → Spring Boot 1.5.x.RELEASE

Happy coding!


Spring and Spring Boot is a trademark of Broadcom Inc. and/or its subsidiaries.