Classic Actors
Note
Pekko Classic pertains to the original Actor APIs, which have been improved by more type safe and guided Actor APIs. Pekko Classic is still fully supported and existing applications can continue to use the classic APIs. It is also possible to use the new Actor APIs together with classic actors in the same ActorSystem, see coexistence. For new projects we recommend using the new Actor API.
Dependency
To use Classic Pekko Actors, you must add the following dependency in your project:
- sbt
val PekkoVersion = "1.0.3" libraryDependencies ++= Seq( "org.apache.pekko" %% "pekko-actor" % PekkoVersion, "org.apache.pekko" %% "pekko-testkit" % PekkoVersion % Test )
- Maven
<properties> <scala.binary.version>2.13</scala.binary.version> </properties> <dependencyManagement> <dependencies> <dependency> <groupId>org.apache.pekko</groupId> <artifactId>pekko-bom_${scala.binary.version}</artifactId> <version>1.0.3</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement> <dependencies> <dependency> <groupId>org.apache.pekko</groupId> <artifactId>pekko-actor_${scala.binary.version}</artifactId> </dependency> <dependency> <groupId>org.apache.pekko</groupId> <artifactId>pekko-testkit_${scala.binary.version}</artifactId> <scope>test</scope> </dependency> </dependencies>
- Gradle
def versions = [ ScalaBinary: "2.13" ] dependencies { implementation platform("org.apache.pekko:pekko-bom_${versions.ScalaBinary}:1.0.3") implementation "org.apache.pekko:pekko-actor_${versions.ScalaBinary}" testImplementation "org.apache.pekko:pekko-testkit_${versions.ScalaBinary}" }
- Classic Actors
- Module info
- Introduction
- Creating Actors
- Actor API
- Identifying Actors via Actor Selection
- Messages and immutability
- Send messages
- Receive messages
- Reply to messages
- Receive timeout
- Timers, scheduled messages
- Stopping actors
- Become/Unbecome
- Stash
- Extending Actors using PartialFunction chaining
- Initialization patterns
- Classic Supervision
- Classic Fault Tolerance
- Classic Dispatchers
- Classic Mailboxes
- Classic Routing
- Classic FSM
- Classic Persistence
- Classic Persistent FSM
- Testing Classic Actors
1.0.3