How to Add Akka Configuration in Maven Project

来源:互联网 发布:数据库外键能有几个 编辑:程序博客网 时间:2024/05/16 19:54

For a simple maven java project (no Spring dependency), the answer is simple, just place the application.conf under /src/main/resources directly,

mapreduce{akka.actor.deployment {/myRandomRouterActor {router = randomnr-of-instances = 5}}}

ActorSystem _system = ActorSystem.create("MapReduceApp", ConfigFactory.load().getConfig("mapreduce"));ActorRef randomRouter = _system.actorOf(Props.create(MasterActor.class).withRouter(new FromConfig()),"myRandomRouterActor");

Reference:

[1] <Akka Essential>

0 0
原创粉丝点击