- RouteIdentifierImpl routeId = new RouteIdentifierImpl(null, rpc, null);
- AddRpc addRpcMsg = new AddRpc(routeId, actorPath);
- try {
- ActorUtil.executeLocalOperation(rpcRegistry, addRpcMsg, ActorUtil.LOCAL_ASK_DURATION, ActorUtil.LOCAL_AWAIT_DURATION);
- LOG.debug("Route added [{}-{}]", routeId, this.actorPath);
- } catch (Exception e) {
- // Just logging it because Akka API throws this exception
- LOG.error(e.toString());
- }
-
+ RpcRouter.RouteIdentifier<?,?,?> routeId = new RouteIdentifierImpl(null, rpc, null);
+ List<RpcRouter.RouteIdentifier<?,?,?>> routeIds = new ArrayList<>();
+ routeIds.add(routeId);
+ RpcRegistry.Messages.AddOrUpdateRoutes addRpcMsg = new RpcRegistry.Messages.AddOrUpdateRoutes(routeIds);
+ rpcRegistry.tell(addRpcMsg, ActorRef.noSender());