Eclipse microprofile config consul extension
A eclipse microprofile config extension which uses Consul as source.
This project has been integrated in https://github.com/microprofile-extensions/config-ext
Currently under discussion to be integrated in smallrye-config
Nevertheless, this project will be maintained until further notice.
0.10 -> Microprofile config 1.4 \
0.11 -> Microprofile config 2.0
The eclipse microprofile config framework is a simple yet powerful configuration framework for Jakarta EE. But most implementations only provide the system/env properties or property files as configuration source. Consuls key/value store is a widely used configuration source, so this small library provides an ConfigSource implementation which takes the values from consul. For performance reasons, the config values are cached.
<dependency>
<groupId>ch.carve</groupId>
<artifactId>mp-config-consul</artifactId>
<version>0.15</version>
</dependency>
Currently there are 6 values you can configure, either through Java system properties or environment variables:
Note: Since mp-config-consul 0.11 (mp-config 2.0) variable substitution is now part of microprofile-config (property expressions)
Note: these config values cannot be set in Quarkus application.properties, you need to pass them as JVM arguments like this
-Dconfigsource.consul.host=consul.mycompany.com
or through environment variables.Note: if both host and hosts are empty, this configsource is disabled!
Config sources have priorities called ordinal. This config source has ordinal 550, but can be overriden with setting ‘config_ordinal’ in this source (including prefix if defined)