6

I'm having a hard time to understand how to use Netflix Archaius with Spring Boot Config.

I have a a microservice that gets the configuration from a Spring Cloud Config Server but I would like to have the configuration automatically refreshed when it is changed. As I understand this can be achieved with Archaius in the client side by pulling the info from the repository.

I have searched but cannot find a tutorial or example where this is done.

Brent Worden
  • 10,624
  • 7
  • 52
  • 57
Oreste
  • 436
  • 1
  • 6
  • 16
  • 3
    In case anyone is interested, I finally used spring-cloud-bus to propagate the refresh command to all the micro-services. – Oreste May 22 '15 at 11:26
  • Hi Oreste, I'm having the same problem. Did you manage to use spring cloud config server + Archaius? There's zero documentation about it :( – codependent Nov 25 '15 at 22:57
  • 1
    Hello WornOutSoles, I did not use Config Server + Archaius. Only the config server by it self. As far as I know the only way to update the data on the services is to pull it from the config service. This can be done by adding the `@RefreshScope` annotation to the beans and then either calling the `/refresh` endpoint (on the client side) or calling the `/bus/refresh` if using Spring Cloud Bus. Also you can schedule refresh interval within the client application. – Oreste Nov 27 '15 at 08:52
  • Hi! thanks for the info. I had read about the `/refresh' endpoint, but nothing about scheduling a refresh. Could you please tell me how to do that? – codependent Nov 27 '15 at 21:18
  • 2
    Hi, even though you can do schedule for the properties to be refreshed this is not the recommended way. Have a look here: [http://projects.spring.io/spring-cloud/spring-cloud.html#_environment_changes](http://projects.spring.io/spring-cloud/spring-cloud.html#_environment_changes) and here [https://github.com/spring-cloud/spring-cloud-config/issues/139](https://github.com/spring-cloud/spring-cloud-config/issues/139) – Oreste Nov 28 '15 at 23:36
  • Thanks again!, I'll have a look at the links. – codependent Nov 29 '15 at 10:34

0 Answers0