I am integrating Hystrix in to my existing project and I want to read the configuration values from an xml file instead of feeding the configuration properties using Configuration Manager. When the values are updated in the xml file I want Hystrix configuration to be updated at runtime.
This is the guide I am following: https://github.com/Netflix/archaius/wiki/Users-Guide
I understand so far that I can use PolledConfigurationSource and the following code:
PolledConfigurationSource source = ...
AbstractPollingScheduler scheduler = ...
DynamicConfiguration configuration = new DynamicConfiguration(source, scheduler);
ConfigurationManager.install(configuration);
How do I point PolledConfigurationSource to an xml file to read the properties after a fixed time interval?
Have you tried using setting this system variable as per documentation?
-Darchaius.configurationSource.additionalUrls=file:///apps/myapp/application.xml
By documentation I am referring to the Getting started web page https://github.com/Netflix/archaius/wiki/Getting-StartedFollowing code did the trick for me
XMLPolledConfigurationSource source code