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 [email protected].
To post to this group, send email to [email protected].
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