In one of our services, we are extending GuiceApplicationLoader to dynamically load some new configuration values (only discoverable at runtime) into our play.api.Configuration object.
The problem is that we are also using an actor system in this app, and the com.typesafe.config.Config that we get from context.system.settings.config appears not to have these configuration values that were dynamically loaded into play.api.Configuration .
Is there a way to ensure that an actor's context.system.settings.config will be derived from the dynamically adjusted play.api.Configuration object?
We used to pull the play.api.Configuration object (via Play.current.configuration) into these areas of the code but we don't anymore because of deprecation.
It seems the two alternatives are to figure out how to DI the play.api.Configuration into our actors (that feels unclean), or to repeat the same dynamic configuration process when we create the actor system, if we can ensure that all other actors will find those values. But I wonder if I am missing a simpler way.
We are on Play 2.4 and are unable to upgrade to Play 2.5 at this time.
Thanks,
Curt Siffert