You can use Source.actorRef along with a subscription. Source.actorRef is the source that materializes in ActorRef , so you can do this:
Please note that the source of ActorRef somewhat limited, for example, it naturally does not support the overpressure overflow strategy for its internal buffer. You can use Source.actorPublisher with an actor who extends ActorPublisher[YourEventType] , this will give you a little more control. However, since EventStream is a pure push-based source, you cannot do more with ActorPublisher than with Source.actorRef , so you can simply use a simpler approach.
source share