vert-x3 / vertx-config

Vert.x Configuration Service
Apache License 2.0
54 stars 64 forks source link

Update Documentation To Clarify Updating Configuration #37

Closed InfoSec812 closed 6 years ago

InfoSec812 commented 6 years ago

Currently, the documentation does not make it clear how to update the running configuration from inside of the application. I recently discovered from experimentation that the following appears to work:

vertx.getOrCreateContext().config().mergeIn(newConfigJsonObject);
cescoffier commented 6 years ago

Yes it works if the ConfigRetriever is using the Context config as ConfigSource. I agree that this should be tested and documented (there is no tests about it at the moment)

On 21 Jan 2018, at 15:48, Deven Phillips notifications@github.com wrote:

Currently, the documentation does not make it clear how to update the running configuration from inside of the application. I recently discovered from experimentation that the following appears to work:

vertx.getOrCreateContext().config().mergeIn(newConfigJsonObject); — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/vert-x3/vertx-config/issues/37, or mute the thread https://github.com/notifications/unsubscribe-auth/AAYjfaoeS-R0kvoi0bT8Go7bbUG_SBLZks5tM043gaJpZM4Rl1yV.

InfoSec812 commented 6 years ago

Is there another method to store the retrieved configuration into the default Vert.x Context? I know that I could use DeploymentOptions to store config for verticles I deploy, but how would I supply a config to a, for example, Service Proxy implementation which we do not supply a DeploymentConfig to?

cescoffier commented 6 years ago

No, as far as I know, there is no other methods. But the ConfigRetriever can use many sources of configuration. What are you trying to achieve?

InfoSec812 commented 6 years ago

Well, I want to set the global configuration so that it is applied to any/all verticles without having to pass a DeploymentOptions instance. Most especially, when using Service Proxies where I cannot provide a DeploymentConfig.

Deven

On Sun, Jan 21, 2018 at 12:22 PM, Clement Escoffier < notifications@github.com> wrote:

No, as far as I know, there is no other methods. But the ConfigRetriever can use many sources of configuration. What are you trying to achieve?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/vert-x3/vertx-config/issues/37#issuecomment-359264585, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGFayeF5l3-ArRpJybw7MKoEarKaQGTks5tM3JMgaJpZM4Rl1yV .

--

Deven Phillips

Senior Consulting ENgineer, RED HAT OPEN INNOVATION LABS

Red Hat

https://www.redhat.com/

deven.phillips@redhat.com https://red.ht/sig

cescoffier commented 6 years ago

The documentation has been updated.