Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

How to use hocon 3.0 in akka.net?


Asked by Gracelynn Cortes on Nov 28, 2021 FAQ



This documentation pertains to the HOCON 3.0 specification, which is currently not in-use inside Akka.NET. Subscribe to updates here by clicking "Watch" on the repository. This is an abridged version of HOCON for its use in Akka.NET. A full .NET implementation of HOCON spec can be read here
Likewise,
HOCON allows you to embed easy-to-read configuration inside of the otherwise hard-to-read XML in App.config and Web.config. HOCON also lets you query configs by their section paths, and those sections are exposed strongly typed and parsed values you can use inside your applications.
Also, Akka.NET relies on HOCON configuration to configure its various knobs and dials. However, as of Akka.NET v1.4 we now support the Setup class and the BootstrapSetup constructs, which allow developers to configure various parts of Akka.NET using programmatic configuration in addition to HOCON.
Also Know,
Substitutions are resolved by looking up the path in the configuration. The path begins with the root configuration object, i.e. it is "absolute" rather than "relative." Substitution processing is performed as the last parsing step, so a substitution can look forward in the configuration.
Just so,
Phobos, a propreitary add-on to Akka.NET for application performance monitoring, uses the PhobosSetup class to pass in monitoring and tracing components to an ActorSystem at startup.