You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code produces an AskTimeoutException:
publicasync Task ConsistentHashingPoolRoutersShouldWorkAsExpectedWithHashMapping(){varpoolRouter=
Sys.ActorOf(Props.Create(()=>new ReporterActor(TestActor)).WithRouter(new ConsistentHashingPool(5,msg =>{if(msg is IConsistentHashable c)return c.ConsistentHashKey;returnmsg;})),"router1");// use some auto-received messages to ensure that those still workvarnumRoutees=(await poolRouter.Ask<Routees>(new GetRoutees(), TimeSpan.FromSeconds(2))).Members.Count();// establish association between ActorSystemsvarsys2Probe= CreateTestProbe(Sys2);varsecondActor= Sys.ActorOf(act => act.ReceiveAny((o,ctx)=> ctx.Sender.Tell(o)),"foo");
Sys2.ActorSelection(new RootActorPath(Sys1Address)/"user"/ secondActor.Path.Name).Tell("foo", sys2Probe);
sys2Probe.ExpectMsg("foo");// have ActorSystem2 message it via tellvarsel= Sys2.ActorSelection(new RootActorPath(Sys1Address)/"user"/"router1");
sel.Tell(new HashableString("foo"));ExpectMsg<HashableString>(str => str.Str.Equals("foo"));// have ActorSystem2 message it via Ask
sel.Ask(new Identify("bar2"), TimeSpan.FromSeconds(3)).PipeTo(sys2Probe);varremoteRouter= sys2Probe.ExpectMsg<ActorIdentity>(x => x.MessageId.Equals("bar2"), TimeSpan.FromSeconds(5)).Subject;vars2Actor= Sys2.ActorOf(act =>{ act.ReceiveAny((o,ctx)=> sel.Ask<ActorIdentity>(new Identify(o), TimeSpan.FromSeconds(3)).PipeTo(sys2Probe));});
s2Actor.Tell("hit");
sys2Probe.ExpectMsg<ActorIdentity>(x => x.MessageId.Equals("hit"), TimeSpan.FromSeconds(5));}
Specifically, this line:
// have ActorSystem2 message it via Ask
sel.Ask(new Identify("bar2"), TimeSpan.FromSeconds(3)).PipeTo(sys2Probe);varremoteRouter= sys2Probe.ExpectMsg<ActorIdentity>(x => x.MessageId.Equals("bar2"), TimeSpan.FromSeconds(5)).Subject;
From the logs:
DEBUG][4/22/2020 9:11:36 PM][Thread 0042][LocalActorRefProvider(akka://test2)] Resolve of path sequence [/temp/f] failed
[INFO][4/22/2020 9:11:36 PM][Thread 0009][akka://test2/temp/f] Message [ActorIdentity] from akka.tcp://test@localhost:55844/user/router1 to akka://test2/temp/f was not delivered. [1] dead letters encountered .This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
The issue might be with running two ActorSystem instances in the same context, but this is 100% reproducible.
The text was updated successfully, but these errors were encountered:
Version: 1.4.4
The following code produces an
AskTimeoutException
:Specifically, this line:
From the logs:
The issue might be with running two
ActorSystem
instances in the same context, but this is 100% reproducible.The text was updated successfully, but these errors were encountered: