Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/meteor/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Scala 为什么Akka演员不接收子频道?_Scala_Akka - Fatal编程技术网

Scala 为什么Akka演员不接收子频道?

Scala 为什么Akka演员不接收子频道?,scala,akka,Scala,Akka,我有一个AkkaActorEventBus(参考),它处理大量传递给不同参与者的消息 我已经安排了一名演员订阅这辆巴士: /** * special actor that transports messages to the hive */ val hiveTalk = { val subscriber = actorSystem.actorOf(Props(new HiveTransport)) Bus.subscribe( subscriber, "/app

我有一个Akka
ActorEventBus
(参考),它处理大量传递给不同参与者的消息

我已经安排了一名演员订阅这辆巴士:

/**
   * special actor that transports messages to the hive
   */
  val hiveTalk = {
    val subscriber = actorSystem.actorOf(Props(new HiveTransport))

    Bus.subscribe( subscriber, "/app/browser/" )
    Bus.subscribe( subscriber, "/app/mobile/" )
  }
MessageBus
类是
ActorEventBus
的实现,如下所示:

/**
 * message bus to route messages to their appropriate contexts
 */
class MessageBus extends ActorEventBus with LookupClassification {

    type Event = MessageEvent
  type Classifier = String

  protected def mapSize(): Int = {
    10
  }

  protected def classify(event: Event): Classifier = {
    event.channel
  }

  protected def publish(event: Event, subscriber: Subscriber): Unit = {
    subscriber ! event
  }

}
问题 由于某些原因,
hiveTalk
参与者订户无法接收发送到类似于
/app/browser/26
的子频道的消息


知道为什么吗?

解决了。显然,查找分类实际上只是简单的单通道实现

子信道分类
是Akka特性,旨在实际实现子信道