The basic premise of an Actor Model is communication via messages. Actor state responds or reacts based on the message that is passed on to the actor. All messages passed should be immutable. In case you pass mutable messages to the actors, the application might behave in weird ways because of the shared mutable message.
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 message model, where the producer of the message expects no reply from the consumer. The message is sent asynchronously and the method returns immediately. Akka actors ...