Search code examples
akka

How to notify all persistent actors of particular type


How to notify all persistent actors of particular type? I have read about Distributed Publish Subscribe but it does not account passivated actors.


Solution

  • Depending on the persistence backend you're using, and whether it supports Persistence Query, you can use the persistence ID queries to get a stream of persistence IDs and use those to resolve a persistent actor for every ID.