Launching... git * [new branch] master -> master The above shows the console on creation of the App: note that Heroku figured out that our app is a Scala app, so it installed the OpenJDK, then compiled and launched the source in the instance.

Otherwise get the head ticket and leave the rest in the tickets list. The TicketSeller takes a so called PoisonPill after it has reported it is sold out. This nicely cleans up the actor (deletes it) when it has no more work to do. In the next section we're going to look at the BoxOffice actor. 3 BoxOffice The BoxOffice needs to create TicketSeller children for every event and delegates the selling to them. The below listing shows how the BoxOffice responds to an Event message: ©Manning Publications Co.

Collaboration/Integraton - If you want to do an integration test of a couple of actors, you would need to eavesdrop in between the actors to assert that the messages have the expected values. It's not immediately clear how this can be done. Luckily Akka provides the akka-testkit module. This module contains a number of testing tools that makes testing actors a lot easier. The testkit module makes a couple of different types of tests possible: Single threaded unit testing - An actor instance is normally not accessible directly.

Download PDF sample

Akka in Action by Raymond Roestenburg
Rated 4.40 of 5 – based on 36 votes