Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

reference.conf vs application.conf files in Akka

I am new in Akka and I am trying to understand the difference between the reference.conf and application.conf files?

What is the proper way to use them? What kind of variables should I have in each file?

like image 485
pik4 Avatar asked Apr 24 '18 08:04

pik4


People also ask

What is reference conf?

reference. conf is a file for library developers. All properties required by the library should be mentioned there and filled with reasonable default values when possible. application. conf is a file for application developers.

What is application conf file?

An application configuration file is an XML file used to control assembly binding. It can redirect an application from using one version of a side-by-side assembly to another version of the same assembly. This is called per-application configuration.

What is Typesafe config?

Typesafe Config allows you to store configuration into separated files and use include keyword to include configuration of those files. Here is a concrete example for myApp which relies on the configuration of moduleA and moduleB .


1 Answers

reference.conf is a file for library developers. All properties required by the library should be mentioned there and filled with reasonable default values when possible.

application.conf is a file for application developers. A developer can set values for properties used by libraries in case they are not the same as defaults. Also he/she can declare his own properties and refer them from the code.

When ConfigFactory.load is called all reference.conf and application.conf files are merged into one configuration and application.conf has higher precedence.

like image 132
simpadjo Avatar answered Oct 19 '22 15:10

simpadjo