Apache Pekko Projections can be used with the @extref:new Actor API or the @extref:classic Actor API. The documentation samples show the new Actor API, and this page highlights how to use it with the classic Actor API.
The ActorSystem is a parameter in several places of the Projections API. That is the org.apache.pekko.actor.typed.ActorSystem. Given a classic org.apache.pekko.actor.ActorSystem it can be adapted to an org.apache.pekko.actor.typed.ActorSystem like this:
Scala : @@snip ClassicDocExample.scala { #system }
Java : @@snip ClassicDocExample.java { #import-adapter #system }
@ref:Events from Apache Pekko Classic Persistence can be emitted from PersistentActor and consumed by a Projection with the @apidoc[EventSourcedProvider$]. The events from the PersistentActor must be tagged by wrapping them in org.apache.pekko.persistence.journal.Tagged, which can be done in the PersistentActor or by using :Event Adapters.
As described in @ref:Running a Projection the Projection is typically run with a Sharded Daemon Process. ShardedDaemonProcess can be used in the same way with a classic org.apache.pekko.actor.ActorSystem, after adapting it to org.apache.pekko.actor.typed.ActorSystem as described @ref:above.
To @ref:run with a local actor the ProjectionBehavior can be spawned from the classic ActorSystem or a classic Actor:
Scala : @@snip ClassicDocExample.scala { #spawn }
Java : @@snip ClassicDocExample.java { #import-adapter #spawn }