public void Can_serialize_RemoteScope() { var address = new Address("akka.tcp", "TestSys", "localhost", 23423); var remoteScope = new RemoteScope(address); AssertEqual(remoteScope); }
// // RemoteScope // private byte[] RemoteScopeToProto(RemoteScope remoteScope) { var message = new Proto.Msg.RemoteScope(); message.Node = AddressMessageBuilder(remoteScope.Address); return(message.ToByteArray()); }
public void CanSerializeScope() { var message = new RemoteScope(new Address("akka.tcp", "foo", "localhost", 8080)); var serializer = Sys.Serialization.FindSerializerFor(message); var serialized = serializer.ToBinary(message); var deserialized = (RemoteScope)serializer.FromBinary(serialized, typeof(RemoteScope)); Assert.Equal(message, deserialized); }
private void CreateRemoteCrawlerGroup() { var hostname = _systemConfiguration.RemoteHost1; var remoteAddress = Address.Parse($"akka.tcp://DeployTarget@{hostname}:8090"); var remoteScope = new RemoteScope(remoteAddress); var remoteCrawler2 = Context.ActorOf( Props.Create(() => new WebCrawlerActor(new AppSettingsConfiguration(), Self)) .WithRouter(new RoundRobinPool(2)) .WithDispatcher("my-dispatcher") .WithDeploy(Deploy.None.WithScope(remoteScope)), "remoteCrawler01"); _actorDictionary.Add("WebCrawlerActor", remoteCrawler2); }
public void CanSerializeRemoteScope() { var message = new RemoteScope(new Address("akka.tcp", "foo", "localhost", 8080)); AssertEqual(message); }