Aaronontheweb on dev
@boekabart added some remarks. I suppose you need to add some more examples to illustrate the need for this change ;)
I've elaborated a bit in the ticket, and will try to add actual code examples. But since the problem is mainly caused by the need to be able to 'compose' actors in a generic way, it's not so trivial to explain in a simple example.
(s) => new msg(d)as the func
Func<IActorRef,object>is the use case
actor.Ask<MyResponse>( (ref) => new SendAnswerTo(ref));- your first example. This code resides either in a Unit Test (although usually we are OK with using
TestActoras recipient), or in production code in an Api Controller ("HTTP to Akka converter"). The second case resides in other actors, not using ask but just
.Tell( new SendAnswerTo( thisActorIVaguelyKnow )).
I have a small question. How can I best test my persistent actors recovery from persistence.
my first test case is to do it "black box style" i send x commands resulting in some good internal state changes. I kill the actor and then revive the actor and send a y command and observe the event coming from that actor using a probe actor who subscribes to that event being published