O'Reilly logo

Akka Essentials by Munish K. Gupta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Messaging model

The basic premise of the Typed Actor Model is communication via method calls. The parameter values are the messages and these need to be immutable. The actor's state responds or reacts based on the method that is invoked onto it.

Sending messages

Once the actor reference is available, messages can be passed to an actor in two modes, as follows:

  • Fire and forget: This is a one-way method call model, where the caller of the method does not expect any reply. All methods with return types void or Unit belong to this category.
  • Send and receive: In this mode, the caller of the method expects a reply from the implementation class and will wait for that reply. In this mode, the method may be invoked asynchronously and a Future is returned representing ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required