Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Message dropped when actor killed in inboxFn #45

Closed
StefanBertels opened this issue Sep 20, 2018 · 1 comment
Closed

Message dropped when actor killed in inboxFn #45

StefanBertels opened this issue Sep 20, 2018 · 1 comment

Comments

@StefanBertels
Copy link
Contributor

If actor gets killed during inbox, the message gets lost (i.e. the message will not be passed to dead-letter):

spawn("test", () =>
{
    Console.WriteLine("setup playground");
    var pid = Self;
    return Observable.Interval(15 * seconds)
                     .Subscribe(i =>
                     {
                         Console.WriteLine("timer tell...");
                         tell(pid, unit);
                     }, () => Console.WriteLine("timer completed!"));
},
(IDisposable state, Unit _) =>
{
    Console.WriteLine("inbox is running");
    kill();
    return state;
});

I expected the message to arrive at dead-letter so I can at least log the fact that some inboxFn was partly executed.

a) Feature?
b) small bug?
c) don't use kill if you want consistence / clean end of an actor

Consistence for me means: a message is only dropped when it was processed successfully or it is passed elsewhere by a MessageDirective or the system crashes.

@StefanBertels
Copy link
Contributor Author

Maybe it's more like an feature because killing another actor will block (#42 / #46) and killing myself with kill() might be a rare special case.

I always can get a dead letter by just throwing an exception (!= ProcessKillException) myself.

Therefore I will close this for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant