@MartinNiemandt prepare some actor, which will create ActorSelection
for all of the actors and will receive ActorIdentity
message from them:
Receive<ActorIdentity>(i => Console.WriteLine("Identity: " + i.Subject));
var selectAll = Context.ActorSelection("/**/*");
selectAll.Tell(new Identify(null));
this will display all of the actors on the console.
/user/**/*
as selection path
physicsWorld.Ask<PhysicsWorld.BodyCreationResult>(new PhysicsWorld.CreateBody(entity))
.ContinueWith((task) => new GameObjectCreationResult(task.Result.Success))
.PipeTo(Sender);
PipeTo
but this is not good way to communicate between actors. Ask
was designed to communicate from outside an actor system
Receive<PhysicsWorld.BodyCreationResult>
in the caller
void IHandle(PhysicsWorld.BodyCreationResult msg)
{
if(msg.Success) {/* do my stuff */}
msg.InitialSender.Tell(new GameObjectCreationResult(msg.Success);
}
let a =
spawn system "act"
<| fun mailbox ->
// this part works like pre-start
let rec loop () = actor {
// receive logic
}
loop ()
Become
is method of Context
not actor itself.
ReceivePersistentActor
, always untyped or raw version
./build.cmd all
fails locally?
Running build failed.
Error:
System.Exception: Start of process failed. Cannot start process because a file name has not been provided.
at Fake.ProcessHelper.ExecProcessWithLambdas@76-16.Invoke(String message) in C:\code\fake\src\app\FakeLib\ProcessHelp
er.fs:line 76
at Fake.ProcessHelper.ExecProcessWithLambdas(FSharpFunc`2 configProcessStartInfoF, TimeSpan timeOut, Boolean silent,
FSharpFunc`2 errorF, FSharpFunc`2 messageF) in C:\code\fake\src\app\FakeLib\ProcessHelper.fs:line 76
at Fake.MSTest.MSTest(FSharpFunc`2 setParams, IEnumerable`1 assemblies) in C:\code\fake\src\app\FakeLib\UnitTest\MSTe
st.fs:line 100
at FSI_0001.Build.clo@209-14.Invoke(Unit _arg9) in D:\Repositories\olympus\akka.net\build.fsx:line 218
at Fake.TargetHelper.runSingleTarget(TargetTemplate`1 target) in C:\code\fake\src\app\FakeLib\TargetHelper.fs:line 48
3
hi. i have the next section in my HOCON config:
dedicated-dispatcher {
type = PinnedDispatcher
throughput = 100
}
this line
var userApp = _actorSystem.ActorOf(Props.Create<UserAppActor>().WithDispatcher("dedicated-dispatcher"), "user-app");
throws an exception "Akka.Configuration.ConfigurationException: Dispatcher [dedicated-dispatcher] not configured for path ..." though the documentation says that a dispatcher can be set using code here http://getakka.net/docs/working-with-actors/Dispatchers#configuring-dispatchers
so such a behavior is a bug?