0

I have setup ActorSystem to perform MapReduce on a collection of data. I have now got last Actor to collate all results. How can i channel the result back to the "service" which initated this Actor System ?

//in below call i wire up all Actors
var getActorSystem = CreateActorSystem();

//I wait for ActorSystem to complete
getActorSystem.WhenTerminated.Wait();

How do i get the result from last Actor in ActorSystem which now has the final result ?

Bek Raupov
  • 3,782
  • 3
  • 24
  • 42

1 Answers1

1

You will need to use the Ask functionality in Akka.NET. Ask will return a Task and thus you will need to wait for its completion after which you can get access to the response from Task.Result.

The docs cover this scenario http://getakka.net/docs/working-with-actors/sending-messages#ask-send-and-receive-future.

DeonHeyns
  • 123
  • 4