rojoangel / camel-spring-config-poc

PoC using spring config server to externalize properties consumed by a camel application

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Apache Camel & Spring Cloud Config Proof of Concept

The project consists in two modules:

config-service

It is an spring-boot application serving properties using spring cloud config server

To start the service use

make run

The service

configurable-camel

It is an apache camel spring boot application acting as client of the config-service

To start the application with the default profile active use

make run

To start the application with the prod profile active use

make run-prod

The application

  • responds to GET requests to
    • /health-property - where a property value is directly used in the camel route, and
    • /health-bean - where a property value is used to initialize a bean and the retrieved in the camel route

and on the management port - 9999

To refresh the application properties use

curl localhost:9999/actuator/refresh -d {} -H "Content-Type: application/json"

The application exposes via HTTP all the management (actuator/*) endpoints - they can be discovered at /actuator/

Here the full list can be found at Spring Boot Actuator Endpoints

E.g. to change un runtime the logging level use

curl -i -X POST -H 'Content-Type: application/json' -d '{"configuredLevel": "INFO"}' http://localhost:9999/actuator/loggers/ROOT

Notes

To have the property values injected to a bean working the following needed to be done:

About

PoC using spring config server to externalize properties consumed by a camel application


Languages

Language:Java 88.4%Language:Makefile 11.6%