-
Notifications
You must be signed in to change notification settings - Fork 1k
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
You may only call Receive-methods when constructing the actor and inside Become() #3163
Comments
You are using it wrong. It should be The fact that the exception is triggered at the Receive method is because the handlers are resolved upon receiving a message. So its only then that your "bug" comes to light. Either way. Ditch the object message parameter. |
Ah, thanks - I missed the redundant parameter. |
Sorry to open something so long dead, but the official documentation (https://getakka.net/articles/actors/receive-actor-api.html) still uses the "object message" as parameter in the examples |
https://getakka.net/articles/actors/receive-actor-api.html was wrong |
@robvangeloven @seungyongshim sorry about that - I'll submit a PR for it |
Should be resolved here: #4958 |
I have an actor (pub sub subscriber) that does something like this:
This throws an InvalidOperationException at the Receive method. I'm a bit confused about how Become() is supposed to work in light of this exception. Of course, this works:
But does this mean Receive is useless inside ReceiveActors that change state?
The text was updated successfully, but these errors were encountered: