如何为持久性和非持久性akka参与者创建自定义邮箱?

时间:2019-03-15 20:20:21

标签: scala akka

我有一个包含长期参与者和非长期参与者的项目。我的配置如下所示。我对akka.custom.CustomMailboxType的实现仅记录非持久性参与者(扩展了Actor的参与者的消息,但不记录持久性参与者receiveCommand(扩展了PersistentActor的参与者)中收到的消息。它仅记录inmemory-snapshot-store中的持久化操作。您如何截获所有消息?

akka.actor.default-mailbox {
  mailbox-type = "akka.custom.CustomMailboxType"
}

unbounded-mailbox {
  mailbox-type = "akka.custom.CustomMailboxType"
}

akka.loglevel = DEBUG

akka.actor.debug {
  receive = on
  lifecycle = off
}

akka.actor.mailbox.requirements {
  "akka.dispatch.UnboundedMessageQueueSemantics" = unbounded-mailbox
  "akka.custom.CustomMailbox" = unbounded-mailbox
}


akka {
  persistence {
    journal.plugin = "inmemory-journal"
    snapshot-store.plugin = "inmemory-snapshot-store"
  }
}

0 个答案:

没有答案