Aaronontheweb on dev
Fix #4083 - Endpoint receive bu… (compare)
********|2018-06-27 13:33:10.3538|Warn|remoting|Tried to associate with unreachable remote address [akka.tcp://****@localhost:50000]. Address is now gated for 5000 ms, all messages to this address will be delivered to dead letters.
log-remote-lifecycle-events
which sounds what I'm looking for to me. But setting it to error
or even off
has no effect. So how can I realize it?
localhost:50000
and the other one at localhost:50001
. Sometimes it is possible by design that localhost:50000
is offline. This state will cause the warning; which is okay to me.
public void RunActorSytem()
{
try
{
var actorSystem = ActorSystem.Create("ActorSystem");
var playerActor1 = actorSystem.ActorOf(Props.Create(() => new PlayerActor("Bob")));
var playerActor2 = actorSystem.ActorOf(Props.Create(() => new PlayerActor("Susan")));
var playerActor3 = actorSystem.ActorOf(Props.Create(() => new PlayerActor("Simon")));
// All events get persisted to EventJournal Sql Server tbl.
// When process is restarted, EventJournal replays messages to actors to restore state,
// BEFORE messages from mailboxes can be processed.
Task.Run(() => RunHitHealLoop(playerActor1));
Task.Run(() => RunHitHealLoop(playerActor2));
Task.Run(() => RunHitHealLoop(playerActor3));
}
catch (Exception e)
{
Log.Error(e.Message);
throw e;
}
}
void RunHitHealLoop(IActorRef playerActor)
{
while (true)
{
playerActor.Tell(new HitMessage(3));
playerActor.Tell(new AddHealthMessage(10));
playerActor.Tell(new DisplayStatusMessage());
Thread.Sleep(3000);
}
}