渡される多くのメッセージを処理するAkka ActorEventBus
(参照https://github.com/akka/akka/blob/master/akka-actor/src/main/scala/akka/event/EventBus.scala#L70 )がありますさまざまな俳優の周り。
このバスを購読するアクターを設定しました:
/**
* 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
}
}
問題
何らかの理由で、サブチャネルに送信されたように見えるメッセージがアクターサブスクライバー/app/browser/26
によって受信されていません。hiveTalk
なぜ何かアイデアはありますか?