Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/piomin/sample-quarkus-microservices-consul

Demo applications illustrating how to build microservices and run them outside Kubernetes with Quarkus. It shows how to integrate the Quarkus application with Consul discovery and the KV store.
https://github.com/piomin/sample-quarkus-microservices-consul

consul consul-kv-store distributed-configuration java load-balancing microservices quarkus quarkus-rest quarkus-stork rest-api rest-client service-discovery smallrye-stork

Last synced: about 1 month ago
JSON representation

Demo applications illustrating how to build microservices and run them outside Kubernetes with Quarkus. It shows how to integrate the Quarkus application with Consul discovery and the KV store.

Awesome Lists containing this project

README

        

# Quarkus Microservices with Consul Discovery Demo Project [![Twitter](https://img.shields.io/twitter/follow/piotr_minkowski.svg?style=social&logo=twitter&label=Follow%20Me)](https://twitter.com/piotr_minkowski)

In this project I'm demonstrating you the most interesting features of [Quarkus Project](https://quarkus.io/) for building microservice-based architecture.

## Getting Started
Currently, you may find here some examples of microservices implementation using different projects from Quarkus. Here's a full list of available examples in this repository:
1. Using Quarkus for building microservices that may be easily deployed outside Kubernetes. Integrating Quarkus with Consul discovery and KV store. The example is available in the branch [master](https://github.com/piomin/sample-quarkus-microservices-consul/tree/master). A detailed guide may be found in the following article: Detailed description can be found here: [Quarkus Microservices with Consul Discovery](https://piotrminkowski.com/2020/11/24/quarkus-microservices-with-consul-discovery/)
2. [Latest] Quarkus with SmallRye Stork and Mutiny Consul Client. The example is available in the branch [Consul with Quarkus and SmallRye Stork](https://github.com/piomin/sample-quarkus-microservices-consul/tree/master).

## Usage
1. Maven 3.6.3+
2. JDK 21+
3. Run Consul with Docker:
```shell
docker run -d --name=consul -e CONSUL_BIND_INTERFACE=eth0 -p 8500:8500 consul
```
4. Run applications:
```shell
mvn compile quarkus:dev
```

## Architecture
Our sample microservices-based system consists of the following modules:
- **gateway-service** - a module that uses Spring Cloud Gateway for running Spring Boot application that acts as a proxy/gateway in our architecture.
- **employee-service** - a module containing the first of our sample microservices that allows to perform CRUD operation on in-memory repository of employees
- **department-service** - a module containing the second of our sample microservices that allows to perform CRUD operation on in-memory repository of departments. It communicates with employee-service.
- **organization-service** - a module containing the third of our sample microservices that allows to perform CRUD operation on in-memory repository of organizations. It communicates with both employee-service and department-service.

The following picture illustrates the architecture described above.