- rpcRegistry = getContext().actorOf(RpcRegistry.props(clusterWrapper), ActorConstants.RPC_REGISTRY);
- rpcBroker = getContext().actorOf(RpcBroker.props(brokerSession, rpcRegistry, schemaContext), ActorConstants.RPC_BROKER);
+ Config conf = ConfigFactory.load();
+
+ rpcRegistry =
+ getContext().actorOf(Props.create(RpcRegistry.class).
+ withMailbox(ActorUtil.MAILBOX), ActorConstants.RPC_REGISTRY);
+
+ rpcBroker =
+ getContext().actorOf(RpcBroker.props(brokerSession, rpcRegistry, schemaContext).
+ withMailbox(ActorUtil.MAILBOX),ActorConstants.RPC_BROKER);
+
+ RpcRegistry.Messages.SetLocalRouter localRouter = new RpcRegistry.Messages.SetLocalRouter(rpcBroker);
+ rpcRegistry.tell(localRouter, self());