Microprofile Dynamic configuration

114 views
Skip to first unread message

Avner Sternheim

unread,
Nov 20, 2019, 7:15:57 AM11/20/19
to Eclipse MicroProfile
Hi,

Do you have an example of using dynamic configuration with MicroProfile.
I need the ability to change configuration without restart.
Do you aware of any config server/service that microprofile can work with. 
For example, Spring have their configuration server. I'm looking for something like that for the microprofile env

thanks,
Avner

Mehdi Raza

unread,
Nov 20, 2019, 7:41:45 AM11/20/19
to microp...@googlegroups.com
Hi

Recently we have tried Microprofile Config with zookeeper, it works like charm and updates configurations without restarts, give it a try.


Regards

--
You received this message because you are subscribed to the Google Groups "Eclipse MicroProfile" group.
To unsubscribe from this group and stop receiving emails from it, send an email to microprofile...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/microprofile/11ff2974-bdca-4aa9-84cf-24c2b9ad740d%40googlegroups.com.

Phillip Krüger

unread,
Nov 20, 2019, 7:52:21 AM11/20/19
to Eclipse MicroProfile
Hi Avner


All file base sources are dynamic and can also fire events on change detection

Cheers

Emily Jiang

unread,
Nov 20, 2019, 6:00:20 PM11/20/19
to Eclipse MicroProfile
Open Liberty has an out of box dynamic config source, which is called server.xml. You can add config property in that file
<variable name="conference" value="devoxx"/>

You can then inject this config property into your microservice. Whenever you update the value, the value will be picked up without the microservice being restarted.
@Inject Provider<String> conf;

See this blog for more info.

Thanks
Emily
Reply all
Reply to author
Forward
0 new messages