-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide a way for verticles to reload configuration upon changes #2606
Comments
can you provide an example of how this would ideally be achieved ? |
I have recently extended the documentation to explain how the new configuration can be sent on the event bus and so let individual verticles "apply" the new configuration (section Propagating configuration changes to the event bus in the doc). I strongly recommend using the event bus to notify the interested verticles with the new configuration. Then, each verticle is on its own and do what's need to be done. Notice that dynamically applying a new configuration may introduce downtime. For instance, changing the HTTP port of a server requires stopping the first one and restarting it. |
thanks for the explanation @cescoffier |
Hi thank you for quick responses. I am unable to find |
While I understand using ConfigRetriever.listen can be used to propagate config changes to many verticles and other components (and it is probably the right way), it would be nice to inform the ConfigRetriever to simply relaunch the main verticle / full application. I usually have this in my main verticle: |
As per documentation for config retriever listening for changes, the retriever reloads the configuration every 5 seconds. Issue is that there is no way provide that new configuration to the verticle without first undeploying and redeploying it with the new configuration or doing a app/pod restart. The reason for that is the
config
JsonObject that holds the configuration for the verticle is created vianew
constructor and there is no reference to thisconfig
object available. This functionality will be really helpful where API keys and certs are being rotated out and live traffic is being taken by the app.The text was updated successfully, but these errors were encountered: