[MAGNOLIA-8199] React on externally provided configuration changes at runtime w/out instance redeploy Created: 22/Feb/21  Updated: 30/Sep/21  Resolved: 17/Mar/21

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: None
Fix Version/s: 6.3.0

Type: Improvement Priority: Neutral
Reporter: Andrei Ichimescu Assignee: Andrei Ichimescu
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:
Epic Link: System configuration restrictions and externalisation
Story Points: 8

 Description   

Problem

Some config properties that reside either in a file or in an external system (db) may change over time. We need a mechanism to reload and reapply the new configuration without a redeploy.

Developer notes

  • Implementing support for Provider<Property> has a limited use case, as some of the services are expensive to initialise. For these cases, a callback/hook mechanism might be required.
  • Consider using Tomcat management/JMX beans to communicate the config update events and use annotated interfaces that core process could trigger an update for.

Example configs

  • SSO
  • Publication
  • Caching


 Comments   
Comment by Mikaël Geljić [ 23/Feb/21 ]

maybe a source of inspiration too: https://smallrye.io/docs/smallrye-config/cdi/cdi.html#config-events

EDIT: also check out alternative injection methods, e.g. ConfigValue objects, Optional<..>, or likewise Provider<..>, Supplier<..> can help doing lazy or non-cached evaluation of property values. As in this example in the spec.

Generated at Mon Feb 12 04:30:32 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.