Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TypedActor vs ReceiveActor?

Tags:

c#

akka.net

Most documentation refers to using ReceiveActor and then methods such as Receive(). However, some documentation refers to inheriting from TypedActor and then using interfaces such as IHandle<MyMessageType>.

Is it safe [as in, best practice/not deprecated] to use TypedActor + Interfaces or should I only be using ReceiveActor? (Official documentation seems to be unclear on the subject)

like image 669
test-in-prod Avatar asked Aug 23 '16 17:08

test-in-prod


2 Answers

TypedActor will be marked as obsolete in version 1.3, and will be removed in version 1.5 (relevant pull request and issue).

There was a discussion a few years ago (as tomliversidge says in their answer) to rename it, but that plan didn't go ahead.

like image 54
user247702 Avatar answered Nov 19 '22 23:11

user247702


There is some discussion here with regards to this. Seems like it is being made obsolete in the Java/Scala Akka world so I'd probably stick to ReceiveActor unless TypedActor gives you something ReceiveActor doesn't

like image 37
tomliversidge Avatar answered Nov 19 '22 23:11

tomliversidge