I tried renaming "common.conf" to "application.conf" but the thing is that 
I'm not making a fat jar so the side effect you were expecting is not 
happening, it would at been a nice trick though, it is not a big deal to 
add *include "common"*, common.jar is one dependency of the project, we 
avoided completely the need of shade or fat jar and instead rely on a 
script generator which creates the .sh executable for each micro-service, 
but each conf is embedded and we would like to pass the conf for each 
microservice as a parameter hence I was looking for a way to remove the 
include responsability and make it programmatically instead.

Thanks for the help though.

Regards,

Guido.

On Thursday, October 29, 2015 at 4:08:54 PM UTC, √ wrote:
>
> make the common.conf the application.conf and then load the externally 
> provided config with ConfigFactory.load?
>
> On Thu, Oct 29, 2015 at 5:03 PM, Guido Medina <oxy...@gmail.com 
> <javascript:>> wrote:
>
>> I tried using withFallback(...) which has different semantics and 
>> behavior, I need something that emulates include programmatically.
>>
>>
>> On Thursday, October 29, 2015 at 2:31:59 PM UTC, Guido Medina wrote:
>>>
>>> Hi,
>>>
>>> I have the following configuration which works fine but because we are 
>>> externalizing so that IT admins have full control of it, we need to be able 
>>> to mimic the *include "common"* section programmatically, here is the 
>>> configution:
>>>
>>> include "common"
>>>
>>> engine {
>>>   cluster.name = ${engine.cluster.name}
>>>
>>>
>>>   admin {
>>>     hostname = ${admin.hostname}
>>>     port = ${admin.port}
>>>   }
>>> }
>>>
>>>
>>> akka.cluster {
>>>   roles = ["account"]
>>>   seed-nodes = ["akka.tcp://"${engine.cluster.name}"@"${engine.admin.
>>> hostname}":"${engine.admin.port}]
>>> }
>>>
>>>
>>>
>>> common.conf is a big conf file with all common configuration for every 
>>> micro-service, what we want is to be able to load that configuration and 
>>> include "common" without to explicitly say that on the conf file header 
>>> section, here is our current common.conf file:
>>>
>>> akka {
>>>   loggers = ["akka.event.slf4j.Slf4jLogger"]
>>>   extensions = [
>>> "com.romix.akka.serialization.kryo.KryoSerializationExtension$"]
>>>
>>>   actor {
>>>     provider = "akka.cluster.ClusterActorRefProvider"
>>>     serializers.java = 
>>> "com.romix.akka.serialization.kryo.KryoSerializer"
>>>     default-mailbox.mailbox-type = 
>>> "akka.dispatch.SingleConsumerOnlyUnboundedMailbox"
>>>
>>>     default-dispatcher {
>>>       type = Dispatcher
>>>       executor = "fork-join-executor"
>>>       throughput = 2
>>>
>>>       fork-join-executor {
>>>         parallelism-min = 4
>>>         parallelism-factor = 1.0
>>>         parallelism-max = 16
>>>         task-peeking-mode = "FIFO"
>>>       }
>>>     }
>>>
>>>     kryo {
>>>       type = "nograph"
>>>       idstrategy = "default"
>>>       serializer-pool-size = 512
>>>       kryo-reference-map = false
>>>     }
>>>   }
>>>
>>>   remote {
>>>     log-remote-lifecycle-events = off
>>>
>>>     netty.tcp {
>>>       port = 0
>>>
>>>       server-socket-worker-pool {
>>>         pool-size-min = 8
>>>         pool-size-factor = 1.0
>>>         pool-size-max = 16
>>>       }
>>>
>>>
>>>       client-socket-worker-pool {
>>>         pool-size-min = 8
>>>         pool-size-factor = 1.0
>>>         pool-size-max = 16
>>>       }
>>>     }
>>>
>>>     default-remote-dispatcher {
>>>       type = Dispatcher
>>>       executor = "fork-join-executor"
>>>
>>>       fork-join-executor {
>>>         parallelism-min = 4
>>>         parallelism-factor = 1.0
>>>         parallelism-max = 16
>>>         task-peeking-mode = "FIFO"
>>>       }
>>>     }
>>>   }
>>>
>>>   cluster {
>>>     auto-down-unreachable-after = 10s
>>>     metrics.enabled = off
>>>     jmx.enabled = off
>>>   }
>>> }
>>>
>>>
>>> engine.dispatcher {
>>>   type = Dispatcher
>>>   executor = "fork-join-executor"
>>>   throughput = 2
>>>
>>>   fork-join-executor {
>>>     parallelism-min = 8
>>>     parallelism-factor = 1.0
>>>     parallelism-max = 16
>>>     task-peeking-mode = "FIFO"
>>>   }
>>> }
>>>
>>>
>>> So far we are able to only:
>>>
>>> ConfigFactory.load("resource_name")
>>>
>>>
>>> where resource_name.conf has the include header section.
>>>
>>> Best regards,
>>>
>>> Guido.
>>>
>> -- 
>> >>>>>>>>>> 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 akka-user+...@googlegroups.com <javascript:>.
>> To post to this group, send email to akka...@googlegroups.com 
>> <javascript:>.
>> Visit this group at http://groups.google.com/group/akka-user.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Cheers,
> √
>

-- 
>>>>>>>>>>      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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to