Skip to content

GracefulStop causes an unnecessary DeadLetter. #2157

@veblush

Description

@veblush

The following code makes an unnecessary DeadLetter while executing GracefulStop.

var greeter = system.ActorOf<GreetingActor>("greeter");
greeter.Tell(new Greet("World"));
greeter.GracefulStop(TimeSpan.FromSeconds(1)).Wait();

DeadLetter log is

[akka://MySystem/deadLetters]
Message DeadLetter from akka://S/user/greeter to akka://S/deadLetters was not delivered.
1 dead letters encountered.

This is caused because there is a difference between Akka and Akka.NET.

GracefulStop of Akka
sends Unwatch message only when the target actor is not terminated because it is not necessary.

But GracefulStop of Akka.NET always
sends Unwatch message even when the actor is terminated, which makes DeadLetter message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions