我正在向我的 akka.net 配置添加一个固定调度程序,因为我读到这将及时向我的演员发送消息,但是当我遵循 akka 配置时,我想出了这个
using (_actorSystem = ActorSystem.Create("SchedulerAutoAction"))
{
var props = Props.Create<TaskSchedulerAktor>().WithDispatcher("pinned-dispatcher"); // handle the mailbox timely
_actorRef = _actorSystem.ActorOf(props, "TaskSchedulerAutoActionActor");
}
因为我想基于固定调度程序运行它,但目前我在终端中收到此错误
Unhandled Exception: Akka.Configuration.ConfigurationException: Dispatcher [pinned-dispatcher] not configured for path akka://SchedulerAutoAction/user/TaskSchedulerAutoActionActor
at Akka.Actor.LocalActorRefProvider.ActorOf(ActorSystemImpl system, Props props, IInternalActorRef supervisor, ActorPath path, Boolean systemService, Deploy deploy, Boolean lookupDeploy, Boolean async)
有人使用调度程序并正确配置它吗?您能建议对我的代码进行任何改进吗?请告诉我