I guess it is all moot now that I have stripped away the defaults and only 
have "changes".

On Saturday, 7 January 2017 01:34:27 UTC+11, Konrad Malawski wrote:
>
> I actually think doing it manually like this will end up being way more 
> confusing... 
> The reference.conf / application.conf style is rather well established in 
> Akka or Scala apps and provides minimal boilerplate.
>
> Reference is defaults "application always wins".
>
> Who "wins" is well known here and also well documented in typesafe-config, 
> please read its docs.
>
>
But for the fact that I am Including the files - so aren't they ALL in 
application.conf?

The documentation reads that there is a merging, and which file wins, given 
a specific set of filenames, only. It does not elaborate on *includes.*

I think there is a documentation update that could be made, to clear it 
up...
And I am happy to propose some text and create a pull request, too.
But... I don't know the facts to actually write about...

(with no regard to grammar / style guides etc...)

Given;

application.conf includes these 2 lines only.


include "1.conf"
include "2.conf"


If there are any duplicate settings / paths.....
* 2.conf will always win or
* included files are always loaded in order they appear (so 1 is loaded and 
then 2) and...
* the last added duplicate path / setting is always the setting used.



Again for my use-case - it doesn't matter - I have altered what  / how I 
was doing configuration, so that I specifically only have "positive" 
changes within application.conf (without duplicates).


As always, thanks for your h


 

> -- 
> Konrad `ktoso` Malawski
> Akka <http://akka.io> @ Lightbend <http://lightbend.com>
>
> On 6 January 2017 at 15:13:25, Gavin Baumanis ([email protected] 
> <javascript:>) wrote:
>
> Hi Patrik, 
> I am aware that artery is the new remote.
> My query was more about having duplicate config items at the same "path" - 
> in different conf files.
>
> In that the example conf file for artery also includes configs items at 
> akka.actor.xxx
> which are also in the akka.actor.conf example conf file : 
>
> Which one wins? 
> Which one is correct?
>
> Anyway : I think I have it resolved now - by not using ALL the config 
> files and just having the configuration needed ONLY.
>
>
> Thanks!
> -Gavin.
>
>
> On Saturday, 7 January 2017 00:45:24 UTC+11, Patrik Nordwall wrote: 
>>
>> Artery config belongs to akka-remote
>>
>> On Fri, Jan 6, 2017 at 2:44 PM, Gavin Baumanis <[email protected]> 
>> wrote:
>>
>>> Hi Konrad, 
>>>
>>> Naturally - I am aware that the defaults ARE defaults.
>>> But for the purpose of documenting the config and providing the 
>>> alternative choices too (Which the example configs do a pretty good job of)
>>> It "seemed harmless" to literally include the default values.
>>>
>>> But I am certainly happy with only include the config you need, when you 
>>> need it.
>>>
>>>
>>> Thanks for the help.
>>> -Gavin.
>>>
>>>
>>> On Saturday, 7 January 2017 00:15:51 UTC+11, Konrad Malawski wrote: 
>>>>
>>>>
>>>> "Each Akka module has a reference configuration file with the default 
>>>> values."
>>>>
>>>> So... What I have done is "literally" take the configuration examples 
>>>> as individual files and "included" them ALL within *application.conf*
>>>>
>>>> include "akka-actor.conf"
>>>> include "akka-agent.conf"
>>>> include "akka-camel.conf"[...]
>>>>
>>>>
>>>> Oh :-) You don't need to do that. The defaults are loaded... by default 
>>>> :-) 
>>>>
>>>>
>>>> Read more about how config works here: 
>>>> https://github.com/typesafehub/config
>>>>
>>>> Basically each project has reference.conf, they all get merged, 
>>>> applied, and then your application.conf gets applied.
>>>> You don't need to touch or import any reference.conf, they're loaded by 
>>>> default. You only need to override what you want in application.conf
>>>>
>>>> -- 
>>>> Konrad `ktoso` Malawski
>>>> Akka <http://akka.io> @ Lightbend <http://lightbend.com>
>>>>
>>>> --
>>> >>>>>>>>>> Read the docs: http://akka.io/docs/
>>> >>>>>>>>>> Check the FAQ: 
>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>> >>>>>>>>>> Search the archives: 
>>> https://groups.google.com/group/akka-user
>>> ---
>>> You received this message because you are subscribed to the Google 
>>> Groups "Akka User List" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to [email protected].
>>> To post to this group, send email to [email protected].
>>> Visit this group at https://groups.google.com/group/akka-user.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>>
>> Patrik Nordwall
>> Akka Tech Lead
>> Lightbend <http://www.lightbend.com/> -  Reactive apps on the JVM
>> Twitter: @patriknw
>>
> --
> >>>>>>>>>> Read the docs: http://akka.io/docs/
> >>>>>>>>>> Check the FAQ: 
> http://doc.akka.io/docs/akka/current/additional/faq.html
> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
> ---
> You received this message because you are subscribed to the Google Groups 
> "Akka User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] <javascript:>.
> To post to this group, send email to [email protected] 
> <javascript:>.
> Visit this group at https://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to